diff --git a/src/menus/DisassemblyContextMenu.cpp b/src/menus/DisassemblyContextMenu.cpp index ed35c3b8..08ed16de 100644 --- a/src/menus/DisassemblyContextMenu.cpp +++ b/src/menus/DisassemblyContextMenu.cpp @@ -329,7 +329,15 @@ QVector DisassemblyContextMenu::getThingU for (const auto &thing : array) { auto obj = thing.toObject(); RVA offset = obj["offset"].toVariant().toULongLong(); - QString name = obj["name"].toString(); + QString name; + + // If real names display is enabled, show flag's real name instead of full flag name + if (Config()->getConfigBool("asm.flags.real") && obj.contains("realname")) { + name = obj["realname"].toString(); + } else { + name = obj["name"].toString(); + } + QString typeString = obj["type"].toString(); ThingUsedHere::Type type = ThingUsedHere::Type::Address; if (typeString == "var") { @@ -477,8 +485,17 @@ void DisassemblyContextMenu::aboutToShowSlot() actionRename.setVisible(true); actionRename.setText(tr("Rename function \"%1\"").arg(fcn->name)); } else if (f) { + QString name; + + // Check if Realname is enabled. If yes, show it instead of the full flag-name. + if (Config()->getConfigBool("asm.flags.real") && f->realname) { + name = f->realname; + } else { + name = f->name; + } + actionRename.setVisible(true); - actionRename.setText(tr("Rename flag \"%1\"").arg(f->name)); + actionRename.setText(tr("Rename flag \"%1\"").arg(name)); } else { actionRename.setVisible(false); }