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 5c55c49769
commit c66bde16d0

View File

@ -152,7 +152,11 @@ class GuiFrame(wx.Frame):
# }}}
# {{{ 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)
def onMouseWheel(self, event):