Toggle remove option for string definition of instruction (#2059) (#2094)

* Toggle remove option for string definition of instruction (#2059)
This commit is contained in:
Dhaval Purohit 2020-03-15 13:51:49 +01:00 committed by GitHub
parent f8a29e27cb
commit ddeb7fbe53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -459,6 +459,10 @@ void DisassemblyContextMenu::aboutToShowSlot()
actionAnalyzeFunction.setVisible(true); actionAnalyzeFunction.setVisible(true);
// Show the option to remove a defined string only if a string is defined in this address
QString stringDefinition = Core()->cmd("Cs. @ " + RAddressString(offset));
actionSetAsStringRemove.setVisible(!stringDefinition.isEmpty());
QString comment = Core()->cmd("CC." + RAddressString(offset)); QString comment = Core()->cmd("CC." + RAddressString(offset));
if (comment.isNull() || comment.isEmpty()) { if (comment.isNull() || comment.isEmpty()) {
actionDeleteComment.setVisible(false); actionDeleteComment.setVisible(false);