libgui/GuiFrame.py:onMenu(): only dispatch events via itemsById[eventId] if present, skip otherwise.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2019-09-11 14:43:55 +02:00
parent e30628f28d
commit 3be34bc657

View File

@ -152,7 +152,11 @@ class GuiFrame(wx.Frame):
# }}} # }}}
# {{{ onMenu(self, event) # {{{ onMenu(self, event)
def onMenu(self, event): def onMenu(self, event):
eventId = event.GetId(); self.itemsById[eventId](event); eventId = event.GetId()
if eventId in self.itemsById:
self.itemsById[eventId](event)
else:
event.Skip()
# }}} # }}}
# {{{ onMouseWheel(self, event) # {{{ onMouseWheel(self, event)
def onMouseWheel(self, event): def onMouseWheel(self, event):