mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 18:54:31 +02:00
Need to store a python reference to the menu on the action to avoid the menu being deleted in case it is not stored anywhere else
This commit is contained in:
parent
7bfed9dcfa
commit
f4ead1897e
1 changed files with 6 additions and 1 deletions
|
|
@ -34,7 +34,12 @@
|
|||
|
||||
|
||||
# Restore ability to associate a menu with an action
|
||||
QAction.setMenu = lambda self, menu: progress_indicator.set_menu_on_action(self, menu)
|
||||
def set_menu(self, menu):
|
||||
self.keep_menu_ref = menu
|
||||
progress_indicator.set_menu_on_action(self, menu)
|
||||
|
||||
|
||||
QAction.setMenu = set_menu
|
||||
QAction.menu = lambda self: progress_indicator.menu_for_action(self)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue