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

@@ -13,13 +13,13 @@ class GraphDmgApplyProjectedMenu(ContextMenuUnconditional):
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
self.settings = GraphSettings.getInstance()
def display(self, srcContext):
def display(self, callingWindow, srcContext):
return srcContext == 'dmgStatsGraph'
def getText(self, itmContext):
def getText(self, callingWindow, itmContext):
return 'Apply Attacker Webs and TPs'
def activate(self, fullContext, i):
def activate(self, callingWindow, fullContext, i):
self.settings.set('applyProjected', not self.settings.get('applyProjected'))
wx.PostEvent(self.mainFrame, GE.GraphOptionChanged())