Gui: Ensure menus don't get moved inadvertently

Co-authored-by: depthoffocus <depthoffocus@users.noreply.github.com>
This commit is contained in:
Chris Hennes
2025-09-17 14:16:13 -05:00
committed by Chris Hennes
parent b08a0f87d6
commit 04c466260c

View File

@@ -885,6 +885,12 @@ void Command::applyCommandData(const char* context, Action* action)
else
action->setStatusTip(QCoreApplication::translate(
context, getToolTipText()));
// Default to QAction::NoRole instead of QAction::TextHeuristicRole to stop collisions with
// e.g. "Preferences" and "Copy"
if (action->action()->menuRole() == QAction::TextHeuristicRole) {
action->setMenuRole(QAction::NoRole);
}
}