From 4ff358675c7368fcb83746cc0d1daadf1b83c015 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 6 Jul 2014 09:13:56 +0530 Subject: [PATCH] Ensure that QActions that are added to the menubar from plugins are not re-interpreted as application menu actions by Qt --- src/calibre/gui2/bars.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/gui2/bars.py b/src/calibre/gui2/bars.py index d43fe4d0fa..b3680ca3ad 100644 --- a/src/calibre/gui2/bars.py +++ b/src/calibre/gui2/bars.py @@ -219,6 +219,7 @@ if isosx: def __init__(self, clone, parent, is_top_level=False, clone_shortcuts=True): QAction.__init__(self, clone.text(), parent) + self.setMenuRole(QAction.NoRole) # ensure this action is not moved around by Qt self.is_top_level = is_top_level self.clone_shortcuts = clone_shortcuts self.clone = clone