From 3a09f4b45cd6d08b8e4e11646932600e06a7ef4c Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sun, 7 Jul 2019 14:25:27 +0300 Subject: [PATCH] Rework FitChanged command to avoid refreshing graph multiple times in certain cases --- gui/builtinAdditionPanes/boosterView.py | 10 +++++----- gui/builtinAdditionPanes/cargoView.py | 10 +++++----- gui/builtinAdditionPanes/commandView.py | 10 +++++----- gui/builtinAdditionPanes/droneView.py | 10 +++++----- gui/builtinAdditionPanes/fighterView.py | 12 ++++++------ gui/builtinAdditionPanes/implantView.py | 12 ++++++------ gui/builtinAdditionPanes/notesView.py | 10 +++++----- gui/builtinAdditionPanes/projectedView.py | 10 +++++----- gui/builtinContextMenus/ammoToDmgPattern.py | 2 +- gui/builtinContextMenus/damagePatternChange.py | 2 +- gui/builtinContextMenus/factorReload.py | 3 +-- gui/builtinContextMenus/priceOptions.py | 3 ++- gui/builtinContextMenus/skillAffectors.py | 2 +- gui/builtinContextMenus/targetResists.py | 2 +- gui/builtinItemStatsViews/itemMutator.py | 2 +- .../pyfaEnginePreferences.py | 3 +-- .../pyfaGeneralPreferences.py | 8 ++++---- .../pyfaMarketPreferences.py | 11 +++++++---- gui/builtinStatsViews/resistancesViewFull.py | 3 ++- gui/builtinViews/emptyView.py | 4 ++-- gui/builtinViews/fittingView.py | 16 ++++++++-------- gui/characterEditor.py | 2 +- gui/characterSelection.py | 10 +++++----- gui/fitCommands/gui/booster/add.py | 4 ++-- gui/fitCommands/gui/booster/changeMeta.py | 4 ++-- gui/fitCommands/gui/booster/remove.py | 4 ++-- .../gui/booster/sideEffectToggleState.py | 4 ++-- gui/fitCommands/gui/booster/toggleStates.py | 4 ++-- gui/fitCommands/gui/cargo/add.py | 4 ++-- gui/fitCommands/gui/cargo/changeAmount.py | 4 ++-- gui/fitCommands/gui/cargo/changeMetas.py | 4 ++-- gui/fitCommands/gui/cargo/remove.py | 4 ++-- gui/fitCommands/gui/commandFit/add.py | 4 ++-- gui/fitCommands/gui/commandFit/remove.py | 4 ++-- gui/fitCommands/gui/commandFit/toggleStates.py | 4 ++-- gui/fitCommands/gui/fitRestrictionToggle.py | 4 ++-- gui/fitCommands/gui/fitSystemSecurity.py | 4 ++-- gui/fitCommands/gui/implant/add.py | 4 ++-- gui/fitCommands/gui/implant/changeLocation.py | 4 ++-- gui/fitCommands/gui/implant/changeMeta.py | 4 ++-- gui/fitCommands/gui/implant/remove.py | 4 ++-- gui/fitCommands/gui/implant/setAdd.py | 4 ++-- gui/fitCommands/gui/implant/toggleStates.py | 4 ++-- gui/fitCommands/gui/itemsRebase.py | 4 ++-- gui/fitCommands/gui/localDrone/add.py | 4 ++-- gui/fitCommands/gui/localDrone/changeAmount.py | 4 ++-- gui/fitCommands/gui/localDrone/changeMetas.py | 4 ++-- gui/fitCommands/gui/localDrone/clone.py | 4 ++-- gui/fitCommands/gui/localDrone/remove.py | 4 ++-- gui/fitCommands/gui/localDrone/stackSplit.py | 4 ++-- gui/fitCommands/gui/localDrone/stacksMerge.py | 4 ++-- gui/fitCommands/gui/localDrone/toggleStates.py | 4 ++-- .../gui/localFighter/abilityToggleState.py | 4 ++-- gui/fitCommands/gui/localFighter/add.py | 4 ++-- gui/fitCommands/gui/localFighter/changeAmount.py | 4 ++-- gui/fitCommands/gui/localFighter/changeMetas.py | 4 ++-- gui/fitCommands/gui/localFighter/remove.py | 4 ++-- gui/fitCommands/gui/localFighter/toggleStates.py | 4 ++-- gui/fitCommands/gui/localModule/add.py | 8 ++++---- gui/fitCommands/gui/localModule/changeCharges.py | 4 ++-- gui/fitCommands/gui/localModule/changeMetas.py | 12 ++++++------ .../gui/localModule/changeMutation.py | 4 ++-- gui/fitCommands/gui/localModule/changeSpool.py | 4 ++-- gui/fitCommands/gui/localModule/changeStates.py | 4 ++-- gui/fitCommands/gui/localModule/clone.py | 8 ++++---- gui/fitCommands/gui/localModule/fillAdd.py | 8 ++++---- gui/fitCommands/gui/localModule/fillClone.py | 8 ++++---- .../gui/localModule/mutatedConvert.py | 4 ++-- gui/fitCommands/gui/localModule/mutatedImport.py | 4 ++-- gui/fitCommands/gui/localModule/mutatedRevert.py | 4 ++-- gui/fitCommands/gui/localModule/remove.py | 8 ++++---- gui/fitCommands/gui/localModule/replace.py | 8 ++++---- gui/fitCommands/gui/localModule/swap.py | 4 ++-- .../gui/localModuleCargo/cargoToLocalModule.py | 12 ++++++------ .../gui/localModuleCargo/localModuleToCargo.py | 12 ++++++------ gui/fitCommands/gui/projectedChangeStates.py | 4 ++-- gui/fitCommands/gui/projectedDrone/add.py | 4 ++-- .../gui/projectedDrone/changeAmount.py | 4 ++-- .../gui/projectedDrone/changeMetas.py | 4 ++-- .../gui/projectedFighter/abilityToggleState.py | 4 ++-- gui/fitCommands/gui/projectedFighter/add.py | 4 ++-- .../gui/projectedFighter/changeAmount.py | 4 ++-- .../gui/projectedFighter/changeMetas.py | 4 ++-- gui/fitCommands/gui/projectedFit/add.py | 4 ++-- gui/fitCommands/gui/projectedFit/changeAmount.py | 4 ++-- gui/fitCommands/gui/projectedModule/add.py | 4 ++-- .../gui/projectedModule/changeCharges.py | 4 ++-- .../gui/projectedModule/changeMetas.py | 4 ++-- .../gui/projectedModule/changeSpool.py | 4 ++-- gui/fitCommands/gui/projectedRemove.py | 4 ++-- gui/fitCommands/gui/shipModeChange.py | 4 ++-- gui/graphFrame/frame.py | 3 ++- gui/graphFrame/lists.py | 3 ++- gui/mainFrame.py | 3 ++- gui/mainMenuBar.py | 8 ++++---- gui/propertyEditor.py | 2 +- gui/shipBrowser.py | 2 +- gui/statsPane.py | 4 ++-- 98 files changed, 254 insertions(+), 248 deletions(-) diff --git a/gui/builtinAdditionPanes/boosterView.py b/gui/builtinAdditionPanes/boosterView.py index 84a1503dc..e57152675 100644 --- a/gui/builtinAdditionPanes/boosterView.py +++ b/gui/builtinAdditionPanes/boosterView.py @@ -101,16 +101,16 @@ class BoosterView(d.Display): def fitChanged(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return sFit = Fit.getInstance() - fit = sFit.getFit(event.fitID) + fit = sFit.getFit(activeFitID) self.Parent.Parent.DisablePage(self, not fit or fit.isStructure) # Clear list and get out if current fitId is None - if event.fitID is None and self.lastFitId is not None: + if activeFitID is None and self.lastFitId is not None: self.DeleteAllItems() self.lastFitId = None return @@ -120,8 +120,8 @@ class BoosterView(d.Display): if self.boosters is not None: self.boosters.sort(key=lambda booster: booster.slot or 0) - if event.fitID != self.lastFitId: - self.lastFitId = event.fitID + if activeFitID != self.lastFitId: + self.lastFitId = activeFitID item = self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_DONTCARE) diff --git a/gui/builtinAdditionPanes/cargoView.py b/gui/builtinAdditionPanes/cargoView.py index 55b3e62de..08714260f 100644 --- a/gui/builtinAdditionPanes/cargoView.py +++ b/gui/builtinAdditionPanes/cargoView.py @@ -137,16 +137,16 @@ class CargoView(d.Display): def fitChanged(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return sFit = Fit.getInstance() - fit = sFit.getFit(event.fitID) + fit = sFit.getFit(activeFitID) # self.Parent.Parent.DisablePage(self, not fit or fit.isStructure) # Clear list and get out if current fitId is None - if event.fitID is None and self.lastFitId is not None: + if activeFitID is None and self.lastFitId is not None: self.DeleteAllItems() self.lastFitId = None return @@ -156,8 +156,8 @@ class CargoView(d.Display): if self.cargo is not None: self.cargo.sort(key=lambda c: (c.item.group.category.name, c.item.group.name, c.item.name)) - if event.fitID != self.lastFitId: - self.lastFitId = event.fitID + if activeFitID != self.lastFitId: + self.lastFitId = activeFitID item = self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_DONTCARE) diff --git a/gui/builtinAdditionPanes/commandView.py b/gui/builtinAdditionPanes/commandView.py index 332dae394..3512de95a 100644 --- a/gui/builtinAdditionPanes/commandView.py +++ b/gui/builtinAdditionPanes/commandView.py @@ -126,24 +126,24 @@ class CommandView(d.Display): def fitChanged(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return sFit = Fit.getInstance() - fit = sFit.getFit(event.fitID) + fit = sFit.getFit(activeFitID) AddCommandFit.populateFits(event) self.Parent.Parent.DisablePage(self, not fit or fit.isStructure) # Clear list and get out if current fitId is None - if event.fitID is None and self.lastFitId is not None: + if activeFitID is None and self.lastFitId is not None: self.DeleteAllItems() self.lastFitId = None return - if event.fitID != self.lastFitId: - self.lastFitId = event.fitID + if activeFitID != self.lastFitId: + self.lastFitId = activeFitID item = self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_DONTCARE) diff --git a/gui/builtinAdditionPanes/droneView.py b/gui/builtinAdditionPanes/droneView.py index e3ffb4a03..2c7774309 100644 --- a/gui/builtinAdditionPanes/droneView.py +++ b/gui/builtinAdditionPanes/droneView.py @@ -201,16 +201,16 @@ class DroneView(Display): def fitChanged(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return sFit = Fit.getInstance() - fit = sFit.getFit(event.fitID) + fit = sFit.getFit(activeFitID) self.Parent.Parent.DisablePage(self, not fit or fit.isStructure) # Clear list and get out if current fitId is None - if event.fitID is None and self.lastFitId is not None: + if activeFitID is None and self.lastFitId is not None: self.DeleteAllItems() self.lastFitId = None return @@ -221,8 +221,8 @@ class DroneView(Display): if self.drones is not None: self.drones.sort(key=self.droneKey) - if event.fitID != self.lastFitId: - self.lastFitId = event.fitID + if activeFitID != self.lastFitId: + self.lastFitId = activeFitID item = self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_DONTCARE) diff --git a/gui/builtinAdditionPanes/fighterView.py b/gui/builtinAdditionPanes/fighterView.py index 79d7daa67..2c55fdd0a 100644 --- a/gui/builtinAdditionPanes/fighterView.py +++ b/gui/builtinAdditionPanes/fighterView.py @@ -90,7 +90,7 @@ class FighterView(wx.Panel): def fitChanged(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return sFit = Fit.getInstance() @@ -246,16 +246,16 @@ class FighterDisplay(d.Display): def fitChanged(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return sFit = Fit.getInstance() - fit = sFit.getFit(event.fitID) + fit = sFit.getFit(activeFitID) self.Parent.Parent.Parent.DisablePage(self.Parent, not fit) # Clear list and get out if current fitId is None - if event.fitID is None and self.lastFitId is not None: + if activeFitID is None and self.lastFitId is not None: self.DeleteAllItems() self.lastFitId = None return @@ -266,8 +266,8 @@ class FighterDisplay(d.Display): if self.fighters is not None: self.fighters.sort(key=self.fighterKey) - if event.fitID != self.lastFitId: - self.lastFitId = event.fitID + if activeFitID != self.lastFitId: + self.lastFitId = activeFitID item = self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_DONTCARE) diff --git a/gui/builtinAdditionPanes/implantView.py b/gui/builtinAdditionPanes/implantView.py index d88212893..21734378d 100644 --- a/gui/builtinAdditionPanes/implantView.py +++ b/gui/builtinAdditionPanes/implantView.py @@ -80,7 +80,7 @@ class ImplantView(wx.Panel): def fitChanged(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return sFit = Fit.getInstance() @@ -156,16 +156,16 @@ class ImplantDisplay(d.Display): def fitChanged(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return sFit = Fit.getInstance() - fit = sFit.getFit(event.fitID) + fit = sFit.getFit(activeFitID) self.Parent.Parent.Parent.DisablePage(self.Parent, not fit or fit.isStructure) # Clear list and get out if current fitId is None - if event.fitID is None and self.lastFitId is not None: + if activeFitID is None and self.lastFitId is not None: self.DeleteAllItems() self.lastFitId = None return @@ -175,8 +175,8 @@ class ImplantDisplay(d.Display): if self.implants is not None: self.implants.sort(key=lambda implant: implant.slot or 0) - if event.fitID != self.lastFitId: - self.lastFitId = event.fitID + if activeFitID != self.lastFitId: + self.lastFitId = activeFitID item = self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_DONTCARE) diff --git a/gui/builtinAdditionPanes/notesView.py b/gui/builtinAdditionPanes/notesView.py index 3a713d7c9..bbde2b688 100644 --- a/gui/builtinAdditionPanes/notesView.py +++ b/gui/builtinAdditionPanes/notesView.py @@ -32,11 +32,11 @@ class NotesView(wx.Panel): def fitChanged(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return sFit = Fit.getInstance() - fit = sFit.getFit(event.fitID) + fit = sFit.getFit(activeFitID) self.saveTimer.Stop() # cancel any pending timers @@ -46,11 +46,11 @@ class NotesView(wx.Panel): if self.lastFitId is not None: sFit.editNotes(self.lastFitId, self.editNotes.GetValue()) - if event.fitID is None and self.lastFitId is not None: + if activeFitID is None and self.lastFitId is not None: self.lastFitId = None return - elif event.fitID != self.lastFitId: - self.lastFitId = event.fitID + elif activeFitID != self.lastFitId: + self.lastFitId = activeFitID self.editNotes.SetValue(fit.notes or "") def onText(self, event): diff --git a/gui/builtinAdditionPanes/projectedView.py b/gui/builtinAdditionPanes/projectedView.py index d95515889..b9be7295d 100644 --- a/gui/builtinAdditionPanes/projectedView.py +++ b/gui/builtinAdditionPanes/projectedView.py @@ -170,25 +170,25 @@ class ProjectedView(d.Display): def fitChanged(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return sFit = Fit.getInstance() - fit = sFit.getFit(event.fitID) + fit = sFit.getFit(activeFitID) # pyfalog.debug('ProjectedView::fitChanged: {}', repr(fit)) self.Parent.Parent.DisablePage(self, not fit or fit.isStructure) # Clear list and get out if current fitId is None - if event.fitID is None and self.lastFitId is not None: + if activeFitID is None and self.lastFitId is not None: self.DeleteAllItems() self.lastFitId = None return - if event.fitID != self.lastFitId: - self.lastFitId = event.fitID + if activeFitID != self.lastFitId: + self.lastFitId = activeFitID item = self.GetNextItem(-1, wx.LIST_NEXT_ALL, wx.LIST_STATE_DONTCARE) diff --git a/gui/builtinContextMenus/ammoToDmgPattern.py b/gui/builtinContextMenus/ammoToDmgPattern.py index 7b6641935..f1e0892a0 100644 --- a/gui/builtinContextMenus/ammoToDmgPattern.py +++ b/gui/builtinContextMenus/ammoToDmgPattern.py @@ -36,7 +36,7 @@ class AmmoToDmgPattern(ContextMenuSingle): def activate(self, fullContext, mainItem, i): fitID = self.mainFrame.getActiveFit() Fit.getInstance().setAsPattern(fitID, mainItem) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) def getBitmap(self, context, mainItem): return None diff --git a/gui/builtinContextMenus/damagePatternChange.py b/gui/builtinContextMenus/damagePatternChange.py index 291451c42..c0f2a336e 100644 --- a/gui/builtinContextMenus/damagePatternChange.py +++ b/gui/builtinContextMenus/damagePatternChange.py @@ -108,7 +108,7 @@ class ChangeDamagePattern(ContextMenuUnconditional): fitID = self.mainFrame.getActiveFit() sFit.setDamagePattern(fitID, pattern) setattr(self.mainFrame, "_activeDmgPattern", pattern) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) ChangeDamagePattern.register() diff --git a/gui/builtinContextMenus/factorReload.py b/gui/builtinContextMenus/factorReload.py index 10cf68fa3..c3074f559 100644 --- a/gui/builtinContextMenus/factorReload.py +++ b/gui/builtinContextMenus/factorReload.py @@ -24,8 +24,7 @@ class FactorReload(ContextMenuUnconditional): def activate(self, fullContext, i): fitIDs = Fit.getInstance().toggleFactorReload() - for fitID in fitIDs: - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=tuple(fitIDs))) @property def checked(self): diff --git a/gui/builtinContextMenus/priceOptions.py b/gui/builtinContextMenus/priceOptions.py index 1677d75c1..18d918bdb 100644 --- a/gui/builtinContextMenus/priceOptions.py +++ b/gui/builtinContextMenus/priceOptions.py @@ -32,7 +32,8 @@ class ItemGroupPrice(ContextMenuUnconditional, metaclass=ABCMeta): def activate(self, fullContext, i): self.settings.set(self.optionName, not self.settings.get(self.optionName)) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.mainFrame.getActiveFit())) + fitID = self.mainFrame.getActiveFit() + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) @property def checked(self): diff --git a/gui/builtinContextMenus/skillAffectors.py b/gui/builtinContextMenus/skillAffectors.py index 2d82088e5..c171f29cf 100644 --- a/gui/builtinContextMenus/skillAffectors.py +++ b/gui/builtinContextMenus/skillAffectors.py @@ -116,7 +116,7 @@ class ChangeAffectingSkills(ContextMenuSingle): self.sFit.changeChar(fitID, self.charID) wx.PostEvent(self.mainFrame, GE.CharListUpdated()) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) ChangeAffectingSkills.register() diff --git a/gui/builtinContextMenus/targetResists.py b/gui/builtinContextMenus/targetResists.py index f2447d97e..b27c4ceef 100644 --- a/gui/builtinContextMenus/targetResists.py +++ b/gui/builtinContextMenus/targetResists.py @@ -38,7 +38,7 @@ class TargetResists(ContextMenuUnconditional): sFit = Fit.getInstance() fitID = self.mainFrame.getActiveFit() sFit.setTargetResists(fitID, pattern) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) def addPattern(self, rootMenu, pattern): id = ContextMenuUnconditional.nextID() diff --git a/gui/builtinItemStatsViews/itemMutator.py b/gui/builtinItemStatsViews/itemMutator.py index 1c97d5be5..3472a323f 100644 --- a/gui/builtinItemStatsViews/itemMutator.py +++ b/gui/builtinItemStatsViews/itemMutator.py @@ -240,4 +240,4 @@ class ItemMutatorList(wx.ScrolledWindow): sFit.switchFit(activeFit) # Send signal to GUI to update stats with current active fit - wx.PostEvent(mainFrame, GE.FitChanged(fitID=activeFit)) + wx.PostEvent(mainFrame, GE.FitChanged(fitIDs=(activeFit,))) diff --git a/gui/builtinPreferenceViews/pyfaEnginePreferences.py b/gui/builtinPreferenceViews/pyfaEnginePreferences.py index d8da4a649..1e60c89dc 100644 --- a/gui/builtinPreferenceViews/pyfaEnginePreferences.py +++ b/gui/builtinPreferenceViews/pyfaEnginePreferences.py @@ -124,8 +124,7 @@ class PFFittingEnginePref(PreferenceView): def OnCBGlobalForceReloadStateChange(self, event): fitIDs = self.sFit.toggleFactorReload(value=bool(self.cbGlobalForceReload.GetValue())) - for fitID in fitIDs: - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=tuple(fitIDs))) def OnCBStrictSkillLevelsChange(self, event): self.engine_settings.set("strictSkillLevels", self.cbStrictSkillLevels.GetValue()) diff --git a/gui/builtinPreferenceViews/pyfaGeneralPreferences.py b/gui/builtinPreferenceViews/pyfaGeneralPreferences.py index 96a8696d1..8d399b29e 100644 --- a/gui/builtinPreferenceViews/pyfaGeneralPreferences.py +++ b/gui/builtinPreferenceViews/pyfaGeneralPreferences.py @@ -132,7 +132,7 @@ class PFGeneralPref(PreferenceView): if iView.active: iView.update(iView.active) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) event.Skip() def onCBGlobalRackSlots(self, event): @@ -140,14 +140,14 @@ class PFGeneralPref(PreferenceView): self.cbRackLabels.Enable(self.cbRackSlots.GetValue()) fitID = self.mainFrame.getActiveFit() self.sFit.refreshFit(fitID) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) event.Skip() def onCBGlobalRackLabels(self, event): self.sFit.serviceFittingOptions["rackLabels"] = self.cbRackLabels.GetValue() fitID = self.mainFrame.getActiveFit() self.sFit.refreshFit(fitID) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) event.Skip() def OnCBGlobalCharStateChange(self, event): @@ -166,7 +166,7 @@ class PFGeneralPref(PreferenceView): self.sFit.serviceFittingOptions["compactSkills"] = self.cbCompactSkills.GetValue() fitID = self.mainFrame.getActiveFit() self.sFit.refreshFit(fitID) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) event.Skip() def onCBReopenFits(self, event): diff --git a/gui/builtinPreferenceViews/pyfaMarketPreferences.py b/gui/builtinPreferenceViews/pyfaMarketPreferences.py index 8d8d156d0..429debbd0 100644 --- a/gui/builtinPreferenceViews/pyfaMarketPreferences.py +++ b/gui/builtinPreferenceViews/pyfaMarketPreferences.py @@ -126,7 +126,7 @@ class PFMarketPref(PreferenceView): fitID = self.mainFrame.getActiveFit() self.sFit.refreshFit(fitID) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) event.Skip() def onPricesSourceSelection(self, event): @@ -135,15 +135,18 @@ class PFMarketPref(PreferenceView): def OnTotalPriceDroneChange(self, event): self.priceSettings.set('drones', event.GetInt()) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.mainFrame.getActiveFit())) + fitID = self.mainFrame.getActiveFit() + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) def OnTotalPriceCargoChange(self, event): self.priceSettings.set('cargo', event.GetInt()) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.mainFrame.getActiveFit())) + fitID = self.mainFrame.getActiveFit() + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) def OnTotalPriceCharacterChange(self, event): self.priceSettings.set('character', event.GetInt()) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.mainFrame.getActiveFit())) + fitID = self.mainFrame.getActiveFit() + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) def OnMarketJumpChange(self, event): self.priceSettings.set('marketMGJumpMode', event.GetInt()) diff --git a/gui/builtinStatsViews/resistancesViewFull.py b/gui/builtinStatsViews/resistancesViewFull.py index 1dcf1da37..8fd46755c 100644 --- a/gui/builtinStatsViews/resistancesViewFull.py +++ b/gui/builtinStatsViews/resistancesViewFull.py @@ -165,7 +165,8 @@ class ResistancesViewFull(StatsView): def ehpSwitch(self, event): self.showEffective = event.effective - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.mainFrame.getActiveFit())) + fitID = self.mainFrame.getActiveFit() + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) def refreshPanel(self, fit): # If we did anything intresting, we'd update our labels to reflect the new fit's stats here diff --git a/gui/builtinViews/emptyView.py b/gui/builtinViews/emptyView.py index 3e6d2b467..b6ddd94f6 100644 --- a/gui/builtinViews/emptyView.py +++ b/gui/builtinViews/emptyView.py @@ -15,7 +15,7 @@ class BlankPage(wx.Panel): self.parent.Bind(EVT_NOTEBOOK_PAGE_CHANGED, self.pageChanged) self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW)) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=None)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=())) def Destroy(self): # todo: This unbind caused fits to not recalc when switching to their tabs; find out why @@ -27,6 +27,6 @@ class BlankPage(wx.Panel): fitID = None # sFit = Fit.getInstance() # sFit.switchFit(fitID) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) event.Skip() diff --git a/gui/builtinViews/fittingView.py b/gui/builtinViews/fittingView.py index 0966b1b8a..49c193e4b 100644 --- a/gui/builtinViews/fittingView.py +++ b/gui/builtinViews/fittingView.py @@ -64,7 +64,7 @@ class FitSpawner(gui.multiSwitch.TabSpawner): if page.activeFitID == event.fitID: count += 1 self.multiSwitch.SetSelection(index) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=event.fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(event.fitID,))) break except Exception as e: pyfalog.critical("Caught exception in fitSelected") @@ -94,7 +94,7 @@ class FitSpawner(gui.multiSwitch.TabSpawner): if isinstance(page, FittingView) and page.activeFitID == fitID: index = self.multiSwitch.GetPageIndex(page) self.multiSwitch.SetSelection(index) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) return elif isinstance(page, gui.builtinViews.emptyView.BlankPage): view = FittingView(self.multiSwitch) @@ -229,7 +229,7 @@ class FittingView(d.Display): fitID = self.getActiveFit() sFit = Fit.getInstance() sFit.switchFit(fitID) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) event.Skip() @@ -313,7 +313,7 @@ class FittingView(d.Display): fit = sFit.getFit(self.getActiveFit()) if fit: sFit.refreshFit(self.getActiveFit()) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.activeFitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(self.activeFitID,))) except RuntimeError: pyfalog.warning("Caught dead object") pass @@ -344,7 +344,7 @@ class FittingView(d.Display): self.slotsChanged() sFit.switchFit(fitID) # @todo pheonix: had to disable this as it was causing a crash at the wxWidgets level. Dunno why, investigate - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) event.Skip() @@ -608,10 +608,10 @@ class FittingView(d.Display): if not self: return activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return try: - if self.activeFitID is not None and self.activeFitID == event.fitID: + if self.activeFitID is not None and self.activeFitID == activeFitID: self.generateMods() if self.GetItemCount() != len(self.mods): # This only happens when turning on/off slot divisions @@ -619,7 +619,7 @@ class FittingView(d.Display): self.refresh(self.mods) self.Refresh() - self.Show(self.activeFitID is not None and self.activeFitID == event.fitID) + self.Show(self.activeFitID is not None and self.activeFitID == activeFitID) except RuntimeError: pyfalog.error("Caught dead object") diff --git a/gui/characterEditor.py b/gui/characterEditor.py index dc0e71428..19ef5adb5 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -296,7 +296,7 @@ class CharacterEditor(wx.Frame): fitID = self.mainFrame.getActiveFit() if fitID is not None: sFit.clearFit(fitID) - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) wx.Frame.Destroy(self) diff --git a/gui/characterSelection.py b/gui/characterSelection.py index e0e7efb7f..ef99bc5b8 100644 --- a/gui/characterSelection.py +++ b/gui/characterSelection.py @@ -188,7 +188,7 @@ class CharacterSelection(wx.Panel): sFit = Fit.getInstance() sFit.changeChar(fitID, charID) self.charCache = self.charChoice.GetCurrentSelection() - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) def toggleRefreshButton(self): charID = self.getActiveCharacter() @@ -216,16 +216,16 @@ class CharacterSelection(wx.Panel): """ event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return - self.charChoice.Enable(event.fitID is not None) + self.charChoice.Enable(activeFitID is not None) choice = self.charChoice sFit = Fit.getInstance() currCharID = choice.GetClientData(choice.GetCurrentSelection()) - fit = sFit.getFit(event.fitID) + fit = sFit.getFit(activeFitID) newCharID = fit.character.ID if fit is not None else None - if event.fitID is None: + if activeFitID is None: self.skillReqsStaticBitmap.SetBitmap(self.cleanSkills) self.skillReqsStaticBitmap.SetToolTip("No active fit") else: diff --git a/gui/fitCommands/gui/booster/add.py b/gui/fitCommands/gui/booster/add.py index 50f3788f4..7dad5862d 100644 --- a/gui/fitCommands/gui/booster/add.py +++ b/gui/fitCommands/gui/booster/add.py @@ -24,7 +24,7 @@ class GuiAddBoosterCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -34,5 +34,5 @@ class GuiAddBoosterCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/booster/changeMeta.py b/gui/fitCommands/gui/booster/changeMeta.py index e69befba3..179046091 100644 --- a/gui/fitCommands/gui/booster/changeMeta.py +++ b/gui/fitCommands/gui/booster/changeMeta.py @@ -31,7 +31,7 @@ class GuiChangeBoosterMetaCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -41,5 +41,5 @@ class GuiChangeBoosterMetaCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/booster/remove.py b/gui/fitCommands/gui/booster/remove.py index 81e86b55f..9138500bd 100644 --- a/gui/fitCommands/gui/booster/remove.py +++ b/gui/fitCommands/gui/booster/remove.py @@ -27,7 +27,7 @@ class GuiRemoveBoostersCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -37,5 +37,5 @@ class GuiRemoveBoostersCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/booster/sideEffectToggleState.py b/gui/fitCommands/gui/booster/sideEffectToggleState.py index f5048c778..2882729d6 100644 --- a/gui/fitCommands/gui/booster/sideEffectToggleState.py +++ b/gui/fitCommands/gui/booster/sideEffectToggleState.py @@ -25,7 +25,7 @@ class GuiToggleBoosterSideEffectStateCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -35,5 +35,5 @@ class GuiToggleBoosterSideEffectStateCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/booster/toggleStates.py b/gui/fitCommands/gui/booster/toggleStates.py index e1b591906..6c42ff286 100644 --- a/gui/fitCommands/gui/booster/toggleStates.py +++ b/gui/fitCommands/gui/booster/toggleStates.py @@ -25,7 +25,7 @@ class GuiToggleBoosterStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -35,5 +35,5 @@ class GuiToggleBoosterStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/cargo/add.py b/gui/fitCommands/gui/cargo/add.py index 77c725c7e..d7788aab9 100644 --- a/gui/fitCommands/gui/cargo/add.py +++ b/gui/fitCommands/gui/cargo/add.py @@ -20,11 +20,11 @@ class GuiAddCargoCommand(wx.Command): cmd = CalcAddCargoCommand(fitID=self.fitID, cargoInfo=CargoInfo(itemID=self.itemID, amount=self.amount)) success = self.internalHistory.submit(cmd) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): success = self.internalHistory.undoAll() eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/cargo/changeAmount.py b/gui/fitCommands/gui/cargo/changeAmount.py index 7fcc017c3..f8f47ee4f 100644 --- a/gui/fitCommands/gui/cargo/changeAmount.py +++ b/gui/fitCommands/gui/cargo/changeAmount.py @@ -26,11 +26,11 @@ class GuiChangeCargoAmountCommand(wx.Command): cmd = CalcRemoveCargoCommand(fitID=self.fitID, cargoInfo=CargoInfo(itemID=self.itemID, amount=math.inf)) success = self.internalHistory.submit(cmd) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): success = self.internalHistory.undoAll() eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/cargo/changeMetas.py b/gui/fitCommands/gui/cargo/changeMetas.py index eb457406a..77cbe4a59 100644 --- a/gui/fitCommands/gui/cargo/changeMetas.py +++ b/gui/fitCommands/gui/cargo/changeMetas.py @@ -39,11 +39,11 @@ class GuiChangeCargoMetasCommand(wx.Command): results.append(self.internalHistory.submitBatch(cmdRemove, cmdAdd)) success = any(results) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): success = self.internalHistory.undoAll() eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/cargo/remove.py b/gui/fitCommands/gui/cargo/remove.py index b3f93d932..baa27bfdc 100644 --- a/gui/fitCommands/gui/cargo/remove.py +++ b/gui/fitCommands/gui/cargo/remove.py @@ -26,11 +26,11 @@ class GuiRemoveCargosCommand(wx.Command): results.append(self.internalHistory.submit(cmd)) success = any(results) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): success = self.internalHistory.undoAll() eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/commandFit/add.py b/gui/fitCommands/gui/commandFit/add.py index 0cb05cfc2..64d5b97ed 100644 --- a/gui/fitCommands/gui/commandFit/add.py +++ b/gui/fitCommands/gui/commandFit/add.py @@ -24,7 +24,7 @@ class GuiAddCommandFitCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -34,5 +34,5 @@ class GuiAddCommandFitCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/commandFit/remove.py b/gui/fitCommands/gui/commandFit/remove.py index 60feeabe0..3a890c0e9 100644 --- a/gui/fitCommands/gui/commandFit/remove.py +++ b/gui/fitCommands/gui/commandFit/remove.py @@ -27,7 +27,7 @@ class GuiRemoveCommandFitsCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -37,5 +37,5 @@ class GuiRemoveCommandFitsCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/commandFit/toggleStates.py b/gui/fitCommands/gui/commandFit/toggleStates.py index f4409816c..cf71197a0 100644 --- a/gui/fitCommands/gui/commandFit/toggleStates.py +++ b/gui/fitCommands/gui/commandFit/toggleStates.py @@ -28,7 +28,7 @@ class GuiToggleCommandFitStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -38,5 +38,5 @@ class GuiToggleCommandFitStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/fitRestrictionToggle.py b/gui/fitCommands/gui/fitRestrictionToggle.py index 43f791db5..9453e8b96 100644 --- a/gui/fitCommands/gui/fitRestrictionToggle.py +++ b/gui/fitCommands/gui/fitRestrictionToggle.py @@ -34,7 +34,7 @@ class GuiToggleFittingRestrictionsCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -46,5 +46,5 @@ class GuiToggleFittingRestrictionsCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/fitSystemSecurity.py b/gui/fitCommands/gui/fitSystemSecurity.py index 9173bed6d..3738b5ad6 100644 --- a/gui/fitCommands/gui/fitSystemSecurity.py +++ b/gui/fitCommands/gui/fitSystemSecurity.py @@ -23,7 +23,7 @@ class GuiChangeFitSystemSecurityCommand(wx.Command): sFit = Fit.getInstance() sFit.recalc(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -32,5 +32,5 @@ class GuiChangeFitSystemSecurityCommand(wx.Command): sFit = Fit.getInstance() sFit.recalc(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/implant/add.py b/gui/fitCommands/gui/implant/add.py index 81a3e279e..62be5b606 100644 --- a/gui/fitCommands/gui/implant/add.py +++ b/gui/fitCommands/gui/implant/add.py @@ -36,7 +36,7 @@ class GuiAddImplantCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -46,5 +46,5 @@ class GuiAddImplantCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/implant/changeLocation.py b/gui/fitCommands/gui/implant/changeLocation.py index 1c7c839a3..2b9de7955 100644 --- a/gui/fitCommands/gui/implant/changeLocation.py +++ b/gui/fitCommands/gui/implant/changeLocation.py @@ -24,7 +24,7 @@ class GuiChangeImplantLocationCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -34,5 +34,5 @@ class GuiChangeImplantLocationCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/implant/changeMeta.py b/gui/fitCommands/gui/implant/changeMeta.py index 5964c7c3b..f085a09f5 100644 --- a/gui/fitCommands/gui/implant/changeMeta.py +++ b/gui/fitCommands/gui/implant/changeMeta.py @@ -31,7 +31,7 @@ class GuiChangeImplantMetaCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -41,5 +41,5 @@ class GuiChangeImplantMetaCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/implant/remove.py b/gui/fitCommands/gui/implant/remove.py index 26006cd7f..1f10e54e5 100644 --- a/gui/fitCommands/gui/implant/remove.py +++ b/gui/fitCommands/gui/implant/remove.py @@ -27,7 +27,7 @@ class GuiRemoveImplantsCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -37,5 +37,5 @@ class GuiRemoveImplantsCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/implant/setAdd.py b/gui/fitCommands/gui/implant/setAdd.py index 23b8f484f..8e7300757 100644 --- a/gui/fitCommands/gui/implant/setAdd.py +++ b/gui/fitCommands/gui/implant/setAdd.py @@ -26,7 +26,7 @@ class GuiAddImplantSetCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) # Some might fail, as we already might have these implants return any(results) @@ -37,5 +37,5 @@ class GuiAddImplantSetCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/implant/toggleStates.py b/gui/fitCommands/gui/implant/toggleStates.py index cad49710d..e0d08dc8f 100644 --- a/gui/fitCommands/gui/implant/toggleStates.py +++ b/gui/fitCommands/gui/implant/toggleStates.py @@ -25,7 +25,7 @@ class GuiToggleImplantStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -35,5 +35,5 @@ class GuiToggleImplantStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/itemsRebase.py b/gui/fitCommands/gui/itemsRebase.py index 77daaec18..d524e599d 100644 --- a/gui/fitCommands/gui/itemsRebase.py +++ b/gui/fitCommands/gui/itemsRebase.py @@ -62,7 +62,7 @@ class GuiRebaseItemsCommand(wx.Command): sFit.recalc(fit) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return len(self.internalHistory) > 0 def Undo(self): @@ -72,5 +72,5 @@ class GuiRebaseItemsCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localDrone/add.py b/gui/fitCommands/gui/localDrone/add.py index 33c29f74b..2f12b5ab3 100644 --- a/gui/fitCommands/gui/localDrone/add.py +++ b/gui/fitCommands/gui/localDrone/add.py @@ -25,7 +25,7 @@ class GuiAddLocalDroneCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -35,5 +35,5 @@ class GuiAddLocalDroneCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localDrone/changeAmount.py b/gui/fitCommands/gui/localDrone/changeAmount.py index 196bed060..25803a9d2 100644 --- a/gui/fitCommands/gui/localDrone/changeAmount.py +++ b/gui/fitCommands/gui/localDrone/changeAmount.py @@ -31,7 +31,7 @@ class GuiChangeLocalDroneAmountCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -41,5 +41,5 @@ class GuiChangeLocalDroneAmountCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localDrone/changeMetas.py b/gui/fitCommands/gui/localDrone/changeMetas.py index b77315065..fcbc70888 100644 --- a/gui/fitCommands/gui/localDrone/changeMetas.py +++ b/gui/fitCommands/gui/localDrone/changeMetas.py @@ -45,7 +45,7 @@ class GuiChangeLocalDroneMetasCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -55,5 +55,5 @@ class GuiChangeLocalDroneMetasCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localDrone/clone.py b/gui/fitCommands/gui/localDrone/clone.py index c451acc56..0f34138e5 100644 --- a/gui/fitCommands/gui/localDrone/clone.py +++ b/gui/fitCommands/gui/localDrone/clone.py @@ -30,7 +30,7 @@ class GuiCloneLocalDroneCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -40,5 +40,5 @@ class GuiCloneLocalDroneCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localDrone/remove.py b/gui/fitCommands/gui/localDrone/remove.py index dbf0b7130..f3a978c74 100644 --- a/gui/fitCommands/gui/localDrone/remove.py +++ b/gui/fitCommands/gui/localDrone/remove.py @@ -31,7 +31,7 @@ class GuiRemoveLocalDronesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -41,5 +41,5 @@ class GuiRemoveLocalDronesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localDrone/stackSplit.py b/gui/fitCommands/gui/localDrone/stackSplit.py index 7c9a44c0e..0f7009a36 100644 --- a/gui/fitCommands/gui/localDrone/stackSplit.py +++ b/gui/fitCommands/gui/localDrone/stackSplit.py @@ -42,7 +42,7 @@ class GuiSplitLocalDroneStackCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -52,5 +52,5 @@ class GuiSplitLocalDroneStackCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localDrone/stacksMerge.py b/gui/fitCommands/gui/localDrone/stacksMerge.py index e6cd19289..83bb908b2 100644 --- a/gui/fitCommands/gui/localDrone/stacksMerge.py +++ b/gui/fitCommands/gui/localDrone/stacksMerge.py @@ -42,7 +42,7 @@ class GuiMergeLocalDroneStacksCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -52,5 +52,5 @@ class GuiMergeLocalDroneStacksCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localDrone/toggleStates.py b/gui/fitCommands/gui/localDrone/toggleStates.py index affd1bda0..ee9184e0b 100644 --- a/gui/fitCommands/gui/localDrone/toggleStates.py +++ b/gui/fitCommands/gui/localDrone/toggleStates.py @@ -28,7 +28,7 @@ class GuiToggleLocalDroneStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -38,5 +38,5 @@ class GuiToggleLocalDroneStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localFighter/abilityToggleState.py b/gui/fitCommands/gui/localFighter/abilityToggleState.py index 926752212..116bfbbd7 100644 --- a/gui/fitCommands/gui/localFighter/abilityToggleState.py +++ b/gui/fitCommands/gui/localFighter/abilityToggleState.py @@ -31,7 +31,7 @@ class GuiToggleLocalFighterAbilityStateCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -41,5 +41,5 @@ class GuiToggleLocalFighterAbilityStateCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localFighter/add.py b/gui/fitCommands/gui/localFighter/add.py index 2e9d98680..fd4f9e192 100644 --- a/gui/fitCommands/gui/localFighter/add.py +++ b/gui/fitCommands/gui/localFighter/add.py @@ -24,7 +24,7 @@ class GuiAddLocalFighterCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -34,5 +34,5 @@ class GuiAddLocalFighterCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localFighter/changeAmount.py b/gui/fitCommands/gui/localFighter/changeAmount.py index 9b535dd20..e71a431d0 100644 --- a/gui/fitCommands/gui/localFighter/changeAmount.py +++ b/gui/fitCommands/gui/localFighter/changeAmount.py @@ -29,7 +29,7 @@ class GuiChangeLocalFighterAmountCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -39,5 +39,5 @@ class GuiChangeLocalFighterAmountCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localFighter/changeMetas.py b/gui/fitCommands/gui/localFighter/changeMetas.py index 1e5f95f50..c725926b8 100644 --- a/gui/fitCommands/gui/localFighter/changeMetas.py +++ b/gui/fitCommands/gui/localFighter/changeMetas.py @@ -41,7 +41,7 @@ class GuiChangeLocalFighterMetasCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -51,5 +51,5 @@ class GuiChangeLocalFighterMetasCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localFighter/remove.py b/gui/fitCommands/gui/localFighter/remove.py index 67f2889b9..62ca784bc 100644 --- a/gui/fitCommands/gui/localFighter/remove.py +++ b/gui/fitCommands/gui/localFighter/remove.py @@ -27,7 +27,7 @@ class GuiRemoveLocalFightersCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -37,5 +37,5 @@ class GuiRemoveLocalFightersCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localFighter/toggleStates.py b/gui/fitCommands/gui/localFighter/toggleStates.py index 3214d70aa..7130c924a 100644 --- a/gui/fitCommands/gui/localFighter/toggleStates.py +++ b/gui/fitCommands/gui/localFighter/toggleStates.py @@ -28,7 +28,7 @@ class GuiToggleLocalFighterStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -38,5 +38,5 @@ class GuiToggleLocalFighterStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModule/add.py b/gui/fitCommands/gui/localModule/add.py index 821c0a59d..a9d8b2970 100644 --- a/gui/fitCommands/gui/localModule/add.py +++ b/gui/fitCommands/gui/localModule/add.py @@ -27,9 +27,9 @@ class GuiAddLocalModuleCommand(wx.Command): eos.db.commit() wx.PostEvent( gui.mainFrame.MainFrame.getInstance(), - GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.itemID) + GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.itemID) if success else - GE.FitChanged(fitID=self.fitID)) + GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -43,7 +43,7 @@ class GuiAddLocalModuleCommand(wx.Command): eos.db.commit() wx.PostEvent( gui.mainFrame.MainFrame.getInstance(), - GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.itemID) + GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.itemID) if success else - GE.FitChanged(fitID=self.fitID)) + GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModule/changeCharges.py b/gui/fitCommands/gui/localModule/changeCharges.py index f22208f6f..ad43155bb 100644 --- a/gui/fitCommands/gui/localModule/changeCharges.py +++ b/gui/fitCommands/gui/localModule/changeCharges.py @@ -25,7 +25,7 @@ class GuiChangeLocalModuleChargesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -35,5 +35,5 @@ class GuiChangeLocalModuleChargesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModule/changeMetas.py b/gui/fitCommands/gui/localModule/changeMetas.py index 5b5b0230e..b2e94ad33 100644 --- a/gui/fitCommands/gui/localModule/changeMetas.py +++ b/gui/fitCommands/gui/localModule/changeMetas.py @@ -48,11 +48,11 @@ class GuiChangeLocalModuleMetasCommand(wx.Command): eos.db.commit() events = [] if success and self.replacedItemIDs: - events.append(GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.replacedItemIDs)) + events.append(GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.replacedItemIDs)) if success: - events.append(GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.newItemID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.newItemID)) if not events: - events.append(GE.FitChanged(fitID=self.fitID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,))) for event in events: wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), event) return success @@ -68,11 +68,11 @@ class GuiChangeLocalModuleMetasCommand(wx.Command): eos.db.commit() events = [] if success: - events.append(GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.newItemID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.newItemID)) if success and self.replacedItemIDs: - events.append(GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.replacedItemIDs)) + events.append(GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.replacedItemIDs)) if not events: - events.append(GE.FitChanged(fitID=self.fitID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,))) for event in events: wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), event) return success diff --git a/gui/fitCommands/gui/localModule/changeMutation.py b/gui/fitCommands/gui/localModule/changeMutation.py index 7ffdf474f..241ce1664 100644 --- a/gui/fitCommands/gui/localModule/changeMutation.py +++ b/gui/fitCommands/gui/localModule/changeMutation.py @@ -30,7 +30,7 @@ class GuiChangeLocalModuleMutationCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -40,5 +40,5 @@ class GuiChangeLocalModuleMutationCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModule/changeSpool.py b/gui/fitCommands/gui/localModule/changeSpool.py index 3dc90932b..4ac8b836d 100644 --- a/gui/fitCommands/gui/localModule/changeSpool.py +++ b/gui/fitCommands/gui/localModule/changeSpool.py @@ -31,7 +31,7 @@ class GuiChangeLocalModuleSpoolCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -41,5 +41,5 @@ class GuiChangeLocalModuleSpoolCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModule/changeStates.py b/gui/fitCommands/gui/localModule/changeStates.py index 51fba410b..482e89bcb 100644 --- a/gui/fitCommands/gui/localModule/changeStates.py +++ b/gui/fitCommands/gui/localModule/changeStates.py @@ -31,7 +31,7 @@ class GuiChangeLocalModuleStatesCommand(wx.Command): sFit.recalc(self.fitID) self.savedRemovedDummies = sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -43,5 +43,5 @@ class GuiChangeLocalModuleStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModule/clone.py b/gui/fitCommands/gui/localModule/clone.py index 06e88ddc4..57b33ac7f 100644 --- a/gui/fitCommands/gui/localModule/clone.py +++ b/gui/fitCommands/gui/localModule/clone.py @@ -32,9 +32,9 @@ class GuiCloneLocalModuleCommand(wx.Command): eos.db.commit() self.savedItemID = fit.modules[self.srcPosition].itemID if success and self.savedItemID is not None: - event = GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.savedItemID) + event = GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.savedItemID) else: - event = GE.FitChanged(fitID=self.fitID) + event = GE.FitChanged(fitIDs=(self.fitID,)) wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), event) return success @@ -48,8 +48,8 @@ class GuiCloneLocalModuleCommand(wx.Command): sFit.fill(self.fitID) eos.db.commit() if success and self.savedItemID is not None: - event = GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.savedItemID) + event = GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.savedItemID) else: - event = GE.FitChanged(fitID=self.fitID) + event = GE.FitChanged(fitIDs=(self.fitID,)) wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), event) return success diff --git a/gui/fitCommands/gui/localModule/fillAdd.py b/gui/fitCommands/gui/localModule/fillAdd.py index 78280c1dc..9adc91c3c 100644 --- a/gui/fitCommands/gui/localModule/fillAdd.py +++ b/gui/fitCommands/gui/localModule/fillAdd.py @@ -33,9 +33,9 @@ class GuiFillWithNewLocalModulesCommand(wx.Command): success = added_modules > 0 wx.PostEvent( gui.mainFrame.MainFrame.getInstance(), - GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.itemID) + GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.itemID) if success else - GE.FitChanged(fitID=self.fitID)) + GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -49,7 +49,7 @@ class GuiFillWithNewLocalModulesCommand(wx.Command): eos.db.commit() wx.PostEvent( gui.mainFrame.MainFrame.getInstance(), - GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.itemID) + GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.itemID) if success else - GE.FitChanged(fitID=self.fitID)) + GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModule/fillClone.py b/gui/fitCommands/gui/localModule/fillClone.py index c1953978f..a7c48ec30 100644 --- a/gui/fitCommands/gui/localModule/fillClone.py +++ b/gui/fitCommands/gui/localModule/fillClone.py @@ -37,9 +37,9 @@ class GuiFillWithClonedLocalModulesCommand(wx.Command): success = added_modules > 0 wx.PostEvent( gui.mainFrame.MainFrame.getInstance(), - GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.savedItemID) + GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.savedItemID) if success else - GE.FitChanged(fitID=self.fitID)) + GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -53,7 +53,7 @@ class GuiFillWithClonedLocalModulesCommand(wx.Command): eos.db.commit() wx.PostEvent( gui.mainFrame.MainFrame.getInstance(), - GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.savedItemID) + GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.savedItemID) if success else - GE.FitChanged(fitID=self.fitID)) + GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModule/mutatedConvert.py b/gui/fitCommands/gui/localModule/mutatedConvert.py index e1bedd034..598e6d0ba 100644 --- a/gui/fitCommands/gui/localModule/mutatedConvert.py +++ b/gui/fitCommands/gui/localModule/mutatedConvert.py @@ -43,7 +43,7 @@ class GuiConvertMutatedLocalModuleCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -53,5 +53,5 @@ class GuiConvertMutatedLocalModuleCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModule/mutatedImport.py b/gui/fitCommands/gui/localModule/mutatedImport.py index 4f1d279c4..972a47e53 100644 --- a/gui/fitCommands/gui/localModule/mutatedImport.py +++ b/gui/fitCommands/gui/localModule/mutatedImport.py @@ -31,7 +31,7 @@ class GuiImportLocalMutatedModuleCommand(wx.Command): eos.db.commit() wx.PostEvent( gui.mainFrame.MainFrame.getInstance(), - GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.newModInfo.itemID)) + GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.newModInfo.itemID)) return success def Undo(self): @@ -45,5 +45,5 @@ class GuiImportLocalMutatedModuleCommand(wx.Command): eos.db.commit() wx.PostEvent( gui.mainFrame.MainFrame.getInstance(), - GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.newModInfo.itemID)) + GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.newModInfo.itemID)) return success diff --git a/gui/fitCommands/gui/localModule/mutatedRevert.py b/gui/fitCommands/gui/localModule/mutatedRevert.py index 57a69c0d0..d5bd41aff 100644 --- a/gui/fitCommands/gui/localModule/mutatedRevert.py +++ b/gui/fitCommands/gui/localModule/mutatedRevert.py @@ -38,7 +38,7 @@ class GuiRevertMutatedLocalModuleCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -48,5 +48,5 @@ class GuiRevertMutatedLocalModuleCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModule/remove.py b/gui/fitCommands/gui/localModule/remove.py index 197abfb38..c71dec15e 100644 --- a/gui/fitCommands/gui/localModule/remove.py +++ b/gui/fitCommands/gui/localModule/remove.py @@ -30,9 +30,9 @@ class GuiRemoveLocalModuleCommand(wx.Command): eos.db.commit() wx.PostEvent( gui.mainFrame.MainFrame.getInstance(), - GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.savedTypeIDs) + GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.savedTypeIDs) if success and self.savedTypeIDs else - GE.FitChanged(fitID=self.fitID)) + GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -46,7 +46,7 @@ class GuiRemoveLocalModuleCommand(wx.Command): eos.db.commit() wx.PostEvent( gui.mainFrame.MainFrame.getInstance(), - GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.savedTypeIDs) + GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.savedTypeIDs) if success and self.savedTypeIDs else - GE.FitChanged(fitID=self.fitID)) + GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModule/replace.py b/gui/fitCommands/gui/localModule/replace.py index 350b1d181..4e4f9ea0a 100644 --- a/gui/fitCommands/gui/localModule/replace.py +++ b/gui/fitCommands/gui/localModule/replace.py @@ -34,9 +34,9 @@ class GuiReplaceLocalModuleCommand(wx.Command): eos.db.commit() wx.PostEvent( gui.mainFrame.MainFrame.getInstance(), - GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.itemID) + GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.itemID) if success else - GE.FitChanged(fitID=self.fitID)) + GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -50,7 +50,7 @@ class GuiReplaceLocalModuleCommand(wx.Command): eos.db.commit() wx.PostEvent( gui.mainFrame.MainFrame.getInstance(), - GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.itemID) + GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.itemID) if success else - GE.FitChanged(fitID=self.fitID)) + GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModule/swap.py b/gui/fitCommands/gui/localModule/swap.py index 8dcf5dcc8..4d07ba150 100644 --- a/gui/fitCommands/gui/localModule/swap.py +++ b/gui/fitCommands/gui/localModule/swap.py @@ -22,11 +22,11 @@ class GuiSwapLocalModulesCommand(wx.Command): cmd = CalcSwapLocalModuleCommand(fitID=self.fitID, position1=self.position1, position2=self.position2) success = self.internalHistory.submit(cmd) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): success = self.internalHistory.undoAll() eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/localModuleCargo/cargoToLocalModule.py b/gui/fitCommands/gui/localModuleCargo/cargoToLocalModule.py index fa4a28245..95c69232e 100644 --- a/gui/fitCommands/gui/localModuleCargo/cargoToLocalModule.py +++ b/gui/fitCommands/gui/localModuleCargo/cargoToLocalModule.py @@ -135,11 +135,11 @@ class GuiCargoToLocalModuleCommand(wx.Command): eos.db.commit() events = [] if self.removedModItemID is not None: - events.append(GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.removedModItemID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.removedModItemID)) if self.addedModItemID is not None: - events.append(GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.addedModItemID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.addedModItemID)) if not events: - events.append(GE.FitChanged(fitID=self.fitID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,))) for event in events: wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), event) return success @@ -155,11 +155,11 @@ class GuiCargoToLocalModuleCommand(wx.Command): eos.db.commit() events = [] if self.addedModItemID is not None: - events.append(GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.addedModItemID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.addedModItemID)) if self.removedModItemID is not None: - events.append(GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.removedModItemID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.removedModItemID)) if not events: - events.append(GE.FitChanged(fitID=self.fitID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,))) for event in events: wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), event) return success diff --git a/gui/fitCommands/gui/localModuleCargo/localModuleToCargo.py b/gui/fitCommands/gui/localModuleCargo/localModuleToCargo.py index bea380698..f4f40a1a7 100644 --- a/gui/fitCommands/gui/localModuleCargo/localModuleToCargo.py +++ b/gui/fitCommands/gui/localModuleCargo/localModuleToCargo.py @@ -114,11 +114,11 @@ class GuiLocalModuleToCargoCommand(wx.Command): eos.db.commit() events = [] if self.removedModItemID is not None: - events.append(GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.removedModItemID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.removedModItemID)) if self.addedModItemID is not None: - events.append(GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.addedModItemID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.addedModItemID)) if not events: - events.append(GE.FitChanged(fitID=self.fitID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,))) for event in events: wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), event) return success @@ -134,11 +134,11 @@ class GuiLocalModuleToCargoCommand(wx.Command): eos.db.commit() events = [] if self.addedModItemID is not None: - events.append(GE.FitChanged(fitID=self.fitID, action='moddel', typeID=self.addedModItemID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.addedModItemID)) if self.removedModItemID is not None: - events.append(GE.FitChanged(fitID=self.fitID, action='modadd', typeID=self.removedModItemID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.removedModItemID)) if not events: - events.append(GE.FitChanged(fitID=self.fitID)) + events.append(GE.FitChanged(fitIDs=(self.fitID,))) for event in events: wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), event) return success diff --git a/gui/fitCommands/gui/projectedChangeStates.py b/gui/fitCommands/gui/projectedChangeStates.py index fc22d9764..d35bbe985 100644 --- a/gui/fitCommands/gui/projectedChangeStates.py +++ b/gui/fitCommands/gui/projectedChangeStates.py @@ -88,7 +88,7 @@ class GuiChangeProjectedItemStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -98,5 +98,5 @@ class GuiChangeProjectedItemStatesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedDrone/add.py b/gui/fitCommands/gui/projectedDrone/add.py index 822e31a4a..c697f43a5 100644 --- a/gui/fitCommands/gui/projectedDrone/add.py +++ b/gui/fitCommands/gui/projectedDrone/add.py @@ -24,7 +24,7 @@ class GuiAddProjectedDroneCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -34,5 +34,5 @@ class GuiAddProjectedDroneCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedDrone/changeAmount.py b/gui/fitCommands/gui/projectedDrone/changeAmount.py index 4314158a6..9700318b6 100644 --- a/gui/fitCommands/gui/projectedDrone/changeAmount.py +++ b/gui/fitCommands/gui/projectedDrone/changeAmount.py @@ -31,7 +31,7 @@ class GuiChangeProjectedDroneAmountCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -41,5 +41,5 @@ class GuiChangeProjectedDroneAmountCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedDrone/changeMetas.py b/gui/fitCommands/gui/projectedDrone/changeMetas.py index 9fafef516..674c19192 100644 --- a/gui/fitCommands/gui/projectedDrone/changeMetas.py +++ b/gui/fitCommands/gui/projectedDrone/changeMetas.py @@ -40,7 +40,7 @@ class GuiChangeProjectedDroneMetasCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -50,5 +50,5 @@ class GuiChangeProjectedDroneMetasCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedFighter/abilityToggleState.py b/gui/fitCommands/gui/projectedFighter/abilityToggleState.py index 63120cb00..7adc59708 100644 --- a/gui/fitCommands/gui/projectedFighter/abilityToggleState.py +++ b/gui/fitCommands/gui/projectedFighter/abilityToggleState.py @@ -31,7 +31,7 @@ class GuiToggleProjectedFighterAbilityStateCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -41,5 +41,5 @@ class GuiToggleProjectedFighterAbilityStateCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedFighter/add.py b/gui/fitCommands/gui/projectedFighter/add.py index 769801ecc..f86f7a9ea 100644 --- a/gui/fitCommands/gui/projectedFighter/add.py +++ b/gui/fitCommands/gui/projectedFighter/add.py @@ -24,7 +24,7 @@ class GuiAddProjectedFighterCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -34,5 +34,5 @@ class GuiAddProjectedFighterCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedFighter/changeAmount.py b/gui/fitCommands/gui/projectedFighter/changeAmount.py index 93e60237d..bdbb042e7 100644 --- a/gui/fitCommands/gui/projectedFighter/changeAmount.py +++ b/gui/fitCommands/gui/projectedFighter/changeAmount.py @@ -29,7 +29,7 @@ class GuiChangeProjectedFighterAmountCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -39,5 +39,5 @@ class GuiChangeProjectedFighterAmountCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedFighter/changeMetas.py b/gui/fitCommands/gui/projectedFighter/changeMetas.py index bcce5cbe3..e7eeb257d 100644 --- a/gui/fitCommands/gui/projectedFighter/changeMetas.py +++ b/gui/fitCommands/gui/projectedFighter/changeMetas.py @@ -36,7 +36,7 @@ class GuiChangeProjectedFighterMetasCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -46,5 +46,5 @@ class GuiChangeProjectedFighterMetasCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedFit/add.py b/gui/fitCommands/gui/projectedFit/add.py index e8f0af24e..28cda2b09 100644 --- a/gui/fitCommands/gui/projectedFit/add.py +++ b/gui/fitCommands/gui/projectedFit/add.py @@ -25,7 +25,7 @@ class GuiAddProjectedFitCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -35,5 +35,5 @@ class GuiAddProjectedFitCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedFit/changeAmount.py b/gui/fitCommands/gui/projectedFit/changeAmount.py index 3bf167527..198592df7 100644 --- a/gui/fitCommands/gui/projectedFit/changeAmount.py +++ b/gui/fitCommands/gui/projectedFit/changeAmount.py @@ -31,7 +31,7 @@ class GuiChangeProjectedFitAmountCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -41,5 +41,5 @@ class GuiChangeProjectedFitAmountCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedModule/add.py b/gui/fitCommands/gui/projectedModule/add.py index da3f3346b..b90c526a8 100644 --- a/gui/fitCommands/gui/projectedModule/add.py +++ b/gui/fitCommands/gui/projectedModule/add.py @@ -24,7 +24,7 @@ class GuiAddProjectedModuleCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -34,5 +34,5 @@ class GuiAddProjectedModuleCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedModule/changeCharges.py b/gui/fitCommands/gui/projectedModule/changeCharges.py index 1fde32910..9930d1f4b 100644 --- a/gui/fitCommands/gui/projectedModule/changeCharges.py +++ b/gui/fitCommands/gui/projectedModule/changeCharges.py @@ -25,7 +25,7 @@ class GuiChangeProjectedModuleChargesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -35,5 +35,5 @@ class GuiChangeProjectedModuleChargesCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedModule/changeMetas.py b/gui/fitCommands/gui/projectedModule/changeMetas.py index 5550aacf7..0fddc8bde 100644 --- a/gui/fitCommands/gui/projectedModule/changeMetas.py +++ b/gui/fitCommands/gui/projectedModule/changeMetas.py @@ -36,7 +36,7 @@ class GuiChangeProjectedModuleMetasCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -46,5 +46,5 @@ class GuiChangeProjectedModuleMetasCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedModule/changeSpool.py b/gui/fitCommands/gui/projectedModule/changeSpool.py index e03f7882a..8e513c650 100644 --- a/gui/fitCommands/gui/projectedModule/changeSpool.py +++ b/gui/fitCommands/gui/projectedModule/changeSpool.py @@ -31,7 +31,7 @@ class GuiChangeProjectedModuleSpoolCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -41,5 +41,5 @@ class GuiChangeProjectedModuleSpoolCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/projectedRemove.py b/gui/fitCommands/gui/projectedRemove.py index 3da1f8d1b..196455b47 100644 --- a/gui/fitCommands/gui/projectedRemove.py +++ b/gui/fitCommands/gui/projectedRemove.py @@ -59,7 +59,7 @@ class GuiRemoveProjectedItemsCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -69,5 +69,5 @@ class GuiRemoveProjectedItemsCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/fitCommands/gui/shipModeChange.py b/gui/fitCommands/gui/shipModeChange.py index aa9072fbe..2132e61aa 100644 --- a/gui/fitCommands/gui/shipModeChange.py +++ b/gui/fitCommands/gui/shipModeChange.py @@ -24,7 +24,7 @@ class GuiChangeShipModeCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success def Undo(self): @@ -34,5 +34,5 @@ class GuiChangeShipModeCommand(wx.Command): sFit.recalc(self.fitID) sFit.fill(self.fitID) eos.db.commit() - wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID)) + wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,))) return success diff --git a/gui/graphFrame/frame.py b/gui/graphFrame/frame.py index f96b554e9..71b482213 100644 --- a/gui/graphFrame/frame.py +++ b/gui/graphFrame/frame.py @@ -155,7 +155,8 @@ class GraphFrame(wx.Frame): def OnFitChanged(self, event): event.Skip() - self.clearCache(reason=GraphCacheCleanupReason.fitChanged, extraData=event.fitID) + for fitID in event.fitIDs: + self.clearCache(reason=GraphCacheCleanupReason.fitChanged, extraData=fitID) self.draw() def OnFitRenamed(self, event): diff --git a/gui/graphFrame/lists.py b/gui/graphFrame/lists.py index 7ca79721d..3fbbd08c2 100644 --- a/gui/graphFrame/lists.py +++ b/gui/graphFrame/lists.py @@ -94,7 +94,8 @@ class BaseList(gui.display.Display): def OnFitChanged(self, event): event.Skip() - self.update(self.fits) + if set(event.fitIDs).union(f.ID for f in self.fits): + self.update(self.fits) def getSelectedFits(self): fits = [] diff --git a/gui/mainFrame.py b/gui/mainFrame.py index 35f8e7a82..5c4251d6c 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -637,7 +637,8 @@ class MainFrame(wx.Frame): def toggleOverrides(self, event): ModifiedAttributeDict.overrides_enabled = not ModifiedAttributeDict.overrides_enabled - wx.PostEvent(self, GE.FitChanged(fitID=self.getActiveFit())) + + wx.PostEvent(self, GE.FitChanged(fitIDs=(self.getActiveFit(),))) menu = self.GetMenuBar() menu.SetLabel(menu.toggleOverridesId, "&Turn Overrides Off" if ModifiedAttributeDict.overrides_enabled else "&Turn Overrides On") diff --git a/gui/mainMenuBar.py b/gui/mainMenuBar.py index 6aad398a3..763120e69 100644 --- a/gui/mainMenuBar.py +++ b/gui/mainMenuBar.py @@ -178,9 +178,9 @@ class MainMenuBar(wx.MenuBar): def fitChanged(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return - enable = event.fitID is not None + enable = activeFitID is not None self.Enable(wx.ID_SAVEAS, enable) self.Enable(wx.ID_COPY, enable) self.Enable(self.exportSkillsNeededId, enable) @@ -198,9 +198,9 @@ class MainMenuBar(wx.MenuBar): self.Enable(self.toggleIgnoreRestrictionID, enable) - if event.fitID: + if activeFitID: sFit = Fit.getInstance() - fit = sFit.getFit(event.fitID) + fit = sFit.getFit(activeFitID) if fit.ignoreRestrictions: self.ignoreRestrictionItem.SetItemLabel("Enable Fitting Re&strictions") diff --git a/gui/propertyEditor.py b/gui/propertyEditor.py index cf4213276..d744b4580 100644 --- a/gui/propertyEditor.py +++ b/gui/propertyEditor.py @@ -106,7 +106,7 @@ class AttributeEditor(wx.Frame): def closeWindow(self): fitID = self.mainFrame.getActiveFit() if fitID is not None: - wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID)) + wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,))) self.Destroy() def OnImport(self, event): diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index 7251e1244..f50cff942 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -99,7 +99,7 @@ class ShipBrowser(wx.Panel): def RefreshList(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return stage = self.GetActiveStage() diff --git a/gui/statsPane.py b/gui/statsPane.py index 51d4d8264..d067e2fc6 100644 --- a/gui/statsPane.py +++ b/gui/statsPane.py @@ -71,10 +71,10 @@ class StatsPane(wx.Panel): def fitChanged(self, event): event.Skip() activeFitID = self.mainFrame.getActiveFit() - if activeFitID is not None and event.fitID is not None and event.fitID != activeFitID: + if activeFitID is not None and activeFitID not in event.fitIDs: return sFit = Fit.getInstance() - fit = sFit.getFit(event.fitID) + fit = sFit.getFit(activeFitID) for view in self.views: view.refreshPanel(fit)