Pass calling window to context menu

This commit is contained in:
DarkPhoenix
2019-07-30 19:12:45 +03:00
parent 5a0ca503c1
commit cd20164d7a
49 changed files with 199 additions and 204 deletions

View File

@@ -163,7 +163,7 @@ class GraphControlPanel(wx.Panel):
self._updateInputs(storeInputs=False)
# Context icon
self.contextIcon.Show(ContextMenu.hasMenu(None, None, (view.internalName,)))
self.contextIcon.Show(ContextMenu.hasMenu(self, None, None, (view.internalName,)))
if layout:
self.graphFrame.Layout()
@@ -346,7 +346,7 @@ class GraphControlPanel(wx.Panel):
def contextMenuHandler(self, event):
viewName = self.graphFrame.getView().internalName
menu = ContextMenu.getMenu(None, None, (viewName,))
menu = ContextMenu.getMenu(self, None, None, (viewName,))
if menu is not None:
self.PopupMenu(menu)
event.Skip()