From a9a9fd1b1a2dd622c9c9997e21ad41f281c221fa Mon Sep 17 00:00:00 2001 From: Ryan Holmes Date: Sun, 24 Mar 2019 19:08:31 -0400 Subject: [PATCH] Clean up another context menu --- gui/characterEditor.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gui/characterEditor.py b/gui/characterEditor.py index 60dbcd3e5..a7a66ca97 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -677,10 +677,7 @@ class ImplantEditorView(BaseImplantEditorView): self.determineEnabled() charEditor.Bind(GE.CHAR_CHANGED, self.contextChanged) - if "__WXGTK__" in wx.PlatformInfo: - self.pluggedImplantsTree.Bind(wx.EVT_RIGHT_UP, self.scheduleMenu) - else: - self.pluggedImplantsTree.Bind(wx.EVT_RIGHT_DOWN, self.scheduleMenu) + self.pluggedImplantsTree.Bind(wx.EVT_CONTEXT_MENU, self.spawnMenu) def bindContext(self): self.Parent.Parent.entityEditor.Bind(wx.EVT_CHOICE, self.contextChanged) @@ -707,11 +704,7 @@ class ImplantEditorView(BaseImplantEditorView): sChar.removeImplant(char.ID, implant) - def scheduleMenu(self, event): - event.Skip() - wx.CallAfter(self.spawnMenu) - - def spawnMenu(self): + def spawnMenu(self, event): context = (("implantEditor",),) # fuck good coding practices, passing a pointer to the character editor here for [reasons] =D # (see implantSets context class for info)