Merge pull request #24014 from chennes/fixCopyMenuMisplaced23769

Gui: Ensure menus don't get moved inadvertently
This commit is contained in:
sliptonic
2025-10-06 11:05:04 -05:00
committed by GitHub

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);
}
}