From 3be34bc657ec3c35ab292755742a43cf321bff8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Wed, 11 Sep 2019 14:43:55 +0200 Subject: [PATCH] libgui/GuiFrame.py:onMenu(): only dispatch events via itemsById[eventId] if present, skip otherwise. --- libgui/GuiFrame.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libgui/GuiFrame.py b/libgui/GuiFrame.py index bb61d8e..d3ff4cd 100644 --- a/libgui/GuiFrame.py +++ b/libgui/GuiFrame.py @@ -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):