Fix #1862591 [QResizeEvent error when changing libraries](https://bugs.launchpad.net/calibre/+bug/1862591)

This commit is contained in:
Kovid Goyal 2020-02-10 15:14:02 +05:30
parent e10dc504cc
commit d05ac8093c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -167,7 +167,7 @@ class DBusMenu(QObject):
def eventFilter(self, obj, ev):
ac = getattr(obj, 'menuAction', lambda : None)()
ac_id = self.action_to_id(ac)
if ac_id is not None:
if ac_id is not None and hasattr(ev, 'action'):
etype = ev.type()
if etype == QEvent.ActionChanged:
ac_id = self.action_to_id(ev.action())