From 04c466260c51d8e3f65c42889ff19301f8c9b378 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Wed, 17 Sep 2025 14:16:13 -0500 Subject: [PATCH] Gui: Ensure menus don't get moved inadvertently Co-authored-by: depthoffocus --- src/Gui/Command.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index 0fde459ef6..72f730ea77 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -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); + } }