From 1154435a8950b03ad06f8448ef88d0600c4fb1f7 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 13 Apr 2019 23:26:53 +0300 Subject: [PATCH] Minor style fixes --- gui/fitCommands/calc/fitChangeCargoAmount.py | 4 ++-- gui/fitCommands/calc/fitChangeDroneAmount.py | 2 +- .../calc/fitChangeFighterAmount.py | 4 ++-- .../calc/fitChangeImplantLocation.py | 4 ++-- .../calc/fitChangeProjectedDroneAmount.py | 2 +- .../calc/fitChangeProjectedFighterAmount.py | 4 ++-- .../calc/fitChangeProjectedFitAmount.py | 4 ++-- gui/fitCommands/calc/fitCloneModule.py | 6 ++---- gui/fitCommands/calc/fitRebaseItem.py | 2 +- gui/fitCommands/calc/fitRemoveBooster.py | 5 +---- gui/fitCommands/calc/fitRemoveImplant.py | 5 +---- .../calc/fitRemoveProjectedModule.py | 5 +---- gui/fitCommands/calc/fitRename.py | 20 +++++++++++-------- gui/fitCommands/calc/fitReplaceModule.py | 6 +++--- gui/fitCommands/guiAddImplant.py | 4 ++-- gui/fitCommands/guiChangeCargoQty.py | 4 ++-- gui/fitCommands/guiChangeDroneQty.py | 4 ++-- gui/fitCommands/guiChangeFighterQty.py | 4 ++-- gui/fitCommands/guiChangeImplantLocation.py | 4 ++-- gui/fitCommands/guiChangeProjectedDroneQty.py | 4 ++-- .../guiChangeProjectedFighterAmount.py | 4 ++-- gui/fitCommands/guiChangeProjectedFitQty.py | 4 ++-- 22 files changed, 49 insertions(+), 56 deletions(-) diff --git a/gui/fitCommands/calc/fitChangeCargoAmount.py b/gui/fitCommands/calc/fitChangeCargoAmount.py index d8b9fac90..7437da90b 100644 --- a/gui/fitCommands/calc/fitChangeCargoAmount.py +++ b/gui/fitCommands/calc/fitChangeCargoAmount.py @@ -9,7 +9,7 @@ from service.fit import Fit pyfalog = Logger(__name__) -class FitChangeCargoAmount(wx.Command): +class FitChangeCargoAmountCommand(wx.Command): def __init__(self, fitID, cargoInfo): wx.Command.__init__(self, True, 'Change Cargo Amount') @@ -33,5 +33,5 @@ class FitChangeCargoAmount(wx.Command): def Undo(self): pyfalog.debug('Undoing change of cargo {} for fit {}'.format(self.cargoInfo, self.fitID)) - cmd = FitChangeCargoAmount(self.fitID, self.savedCargoInfo) + cmd = FitChangeCargoAmountCommand(fitID=self.fitID, cargoInfo=self.savedCargoInfo) return cmd.Do() diff --git a/gui/fitCommands/calc/fitChangeDroneAmount.py b/gui/fitCommands/calc/fitChangeDroneAmount.py index 7ff533f23..8fa953c4a 100644 --- a/gui/fitCommands/calc/fitChangeDroneAmount.py +++ b/gui/fitCommands/calc/fitChangeDroneAmount.py @@ -11,7 +11,7 @@ from service.fit import Fit pyfalog = Logger(__name__) -class FitChangeDroneAmount(wx.Command): +class FitChangeDroneAmountCommand(wx.Command): def __init__(self, fitID, position, amount): wx.Command.__init__(self, True, 'Change Drone Amount') diff --git a/gui/fitCommands/calc/fitChangeFighterAmount.py b/gui/fitCommands/calc/fitChangeFighterAmount.py index d1fe43e95..3961d6eb6 100644 --- a/gui/fitCommands/calc/fitChangeFighterAmount.py +++ b/gui/fitCommands/calc/fitChangeFighterAmount.py @@ -8,7 +8,7 @@ from service.fit import Fit pyfalog = Logger(__name__) -class FitChangeFighterAmount(wx.Command): +class FitChangeFighterAmountCommand(wx.Command): def __init__(self, fitID, position, amount): wx.Command.__init__(self, True, 'Change Fighter Amount') @@ -35,5 +35,5 @@ class FitChangeFighterAmount(wx.Command): def Undo(self): pyfalog.debug('Undoing change of fighter amount to {} at position {} on fit {}'.format(self.amount, self.position, self.fitID)) - cmd = FitChangeFighterAmount(self.fitID, self.position, self.savedAmount) + cmd = FitChangeFighterAmountCommand(fitID=self.fitID, position=self.position, amount=self.savedAmount) return cmd.Do() diff --git a/gui/fitCommands/calc/fitChangeImplantLocation.py b/gui/fitCommands/calc/fitChangeImplantLocation.py index 4edc491a1..0d816a838 100644 --- a/gui/fitCommands/calc/fitChangeImplantLocation.py +++ b/gui/fitCommands/calc/fitChangeImplantLocation.py @@ -8,7 +8,7 @@ from service.fit import Fit pyfalog = Logger(__name__) -class FitChangeImplantLocation(wx.Command): +class FitChangeImplantLocationCommand(wx.Command): def __init__(self, fitID, source): wx.Command.__init__(self, True, 'Change Implant Location') @@ -27,5 +27,5 @@ class FitChangeImplantLocation(wx.Command): return True def Undo(self): - cmd = FitChangeImplantLocation(self.fitID, self.savedSource) + cmd = FitChangeImplantLocationCommand(fitID=self.fitID, source=self.savedSource) return cmd.Do() diff --git a/gui/fitCommands/calc/fitChangeProjectedDroneAmount.py b/gui/fitCommands/calc/fitChangeProjectedDroneAmount.py index 5503be915..fc49b6450 100644 --- a/gui/fitCommands/calc/fitChangeProjectedDroneAmount.py +++ b/gui/fitCommands/calc/fitChangeProjectedDroneAmount.py @@ -11,7 +11,7 @@ from service.fit import Fit pyfalog = Logger(__name__) -class FitChangeProjectedDroneAmount(wx.Command): +class FitChangeProjectedDroneAmountCommand(wx.Command): def __init__(self, fitID, itemID, amount): wx.Command.__init__(self, True, 'Change Projected Drone Amount') diff --git a/gui/fitCommands/calc/fitChangeProjectedFighterAmount.py b/gui/fitCommands/calc/fitChangeProjectedFighterAmount.py index 1c5232a4a..2215ac60a 100644 --- a/gui/fitCommands/calc/fitChangeProjectedFighterAmount.py +++ b/gui/fitCommands/calc/fitChangeProjectedFighterAmount.py @@ -8,7 +8,7 @@ from service.fit import Fit pyfalog = Logger(__name__) -class FitChangeProjectedFighterAmount(wx.Command): +class FitChangeProjectedFighterAmountCommand(wx.Command): def __init__(self, fitID, position, amount): wx.Command.__init__(self, True, 'Change Projected Fighter Amount') @@ -35,5 +35,5 @@ class FitChangeProjectedFighterAmount(wx.Command): def Undo(self): pyfalog.debug('Undoing change of projected fighter amount to {} at position {} on fit {}'.format(self.amount, self.position, self.fitID)) - cmd = FitChangeProjectedFighterAmount(self.fitID, self.position, self.savedAmount) + cmd = FitChangeProjectedFighterAmountCommand(fitID=self.fitID, position=self.position, amount=self.savedAmount) return cmd.Do() diff --git a/gui/fitCommands/calc/fitChangeProjectedFitAmount.py b/gui/fitCommands/calc/fitChangeProjectedFitAmount.py index e7830c0a2..c5252c510 100644 --- a/gui/fitCommands/calc/fitChangeProjectedFitAmount.py +++ b/gui/fitCommands/calc/fitChangeProjectedFitAmount.py @@ -8,7 +8,7 @@ from service.fit import Fit pyfalog = Logger(__name__) -class FitChangeProjectedFitAmount(wx.Command): +class FitChangeProjectedFitAmountCommand(wx.Command): def __init__(self, fitID, projectedFitID, amount): wx.Command.__init__(self, True, 'Change Projected Fit Amount') @@ -36,5 +36,5 @@ class FitChangeProjectedFitAmount(wx.Command): def Undo(self): pyfalog.debug('Undoing change of projected fit {} amount to {} for fit {}'.format(self.projectedFitID, self.amount, self.fitID)) - cmd = FitChangeProjectedFitAmount(self.fitID, self.projectedFitID, self.savedAmount) + cmd = FitChangeProjectedFitAmountCommand(fitID=self.fitID, projectedFitID=self.projectedFitID, amount=self.savedAmount) return cmd.Do() diff --git a/gui/fitCommands/calc/fitCloneModule.py b/gui/fitCommands/calc/fitCloneModule.py index 207cd7dbd..0f19b674b 100644 --- a/gui/fitCommands/calc/fitCloneModule.py +++ b/gui/fitCommands/calc/fitCloneModule.py @@ -5,7 +5,6 @@ from logbook import Logger import eos.db from eos.exception import HandledListActionError -from gui.fitCommands.helpers import ModuleInfo from service.fit import Fit @@ -45,6 +44,5 @@ class FitCloneModuleCommand(wx.Command): def Undo(self): pyfalog.debug('Undoing cloning from position {} to position {} for fit ID {}'.format(self.srcPosition, self.dstPosition, self.fitID)) from .fitRemoveModule import FitRemoveModuleCommand - cmd = FitRemoveModuleCommand(self.fitID, [self.dstPosition]) - cmd.Do() - return True + cmd = FitRemoveModuleCommand(fitID=self.fitID, positions=[self.dstPosition]) + return cmd.Do() diff --git a/gui/fitCommands/calc/fitRebaseItem.py b/gui/fitCommands/calc/fitRebaseItem.py index 40c861069..6b62868f3 100644 --- a/gui/fitCommands/calc/fitRebaseItem.py +++ b/gui/fitCommands/calc/fitRebaseItem.py @@ -36,5 +36,5 @@ class FitRebaseItemCommand(wx.Command): def Undo(self): pyfalog.debug('Undoing rebase of item in {} at position {} to {}'.format(self.containerName, self.position, self.itemID)) - cmd = FitRebaseItemCommand(self.fitID, self.containerName, self.position, self.savedItemID) + cmd = FitRebaseItemCommand(fitID=self.fitID, containerName=self.containerName, position=self.position, itemID=self.savedItemID) return cmd.Do() diff --git a/gui/fitCommands/calc/fitRemoveBooster.py b/gui/fitCommands/calc/fitRemoveBooster.py index 1ca036e05..0297655f6 100644 --- a/gui/fitCommands/calc/fitRemoveBooster.py +++ b/gui/fitCommands/calc/fitRemoveBooster.py @@ -29,8 +29,5 @@ class FitRemoveBoosterCommand(wx.Command): def Undo(self): pyfalog.debug('Undoing removal of booster {} on fit {}'.format(self.savedBoosterInfo, self.fitID)) from .fitAddBooster import FitAddBoosterCommand - cmd = FitAddBoosterCommand( - fitID=self.fitID, - boosterInfo=self.savedBoosterInfo, - position=self.position) + cmd = FitAddBoosterCommand(fitID=self.fitID, boosterInfo=self.savedBoosterInfo, position=self.position) return cmd.Do() diff --git a/gui/fitCommands/calc/fitRemoveImplant.py b/gui/fitCommands/calc/fitRemoveImplant.py index 049cc0c30..0e500630e 100644 --- a/gui/fitCommands/calc/fitRemoveImplant.py +++ b/gui/fitCommands/calc/fitRemoveImplant.py @@ -29,8 +29,5 @@ class FitRemoveImplantCommand(wx.Command): def Undo(self): pyfalog.debug('Undoing removal of implant {} on fit {}'.format(self.savedImplantInfo, self.fitID)) from .fitAddImplant import FitAddImplantCommand - cmd = FitAddImplantCommand( - fitID=self.fitID, - implantInfo=self.savedImplantInfo, - position=self.position) + cmd = FitAddImplantCommand(fitID=self.fitID, implantInfo=self.savedImplantInfo, position=self.position) return cmd.Do() diff --git a/gui/fitCommands/calc/fitRemoveProjectedModule.py b/gui/fitCommands/calc/fitRemoveProjectedModule.py index 30d034a9b..6908c4fe5 100644 --- a/gui/fitCommands/calc/fitRemoveProjectedModule.py +++ b/gui/fitCommands/calc/fitRemoveProjectedModule.py @@ -29,8 +29,5 @@ class FitRemoveProjectedModuleCommand(wx.Command): def Undo(self): pyfalog.debug('Undoing removal of projected module {} on fit {}'.format(self.savedModInfo, self.fitID)) from gui.fitCommands.calc.fitAddProjectedModule import FitAddProjectedModuleCommand - cmd = FitAddProjectedModuleCommand( - fitID=self.fitID, - modInfo=self.savedModInfo, - position=self.position) + cmd = FitAddProjectedModuleCommand(fitID=self.fitID, modInfo=self.savedModInfo, position=self.position) return cmd.Do() diff --git a/gui/fitCommands/calc/fitRename.py b/gui/fitCommands/calc/fitRename.py index 38a72c519..78c09dd91 100644 --- a/gui/fitCommands/calc/fitRename.py +++ b/gui/fitCommands/calc/fitRename.py @@ -2,25 +2,29 @@ import wx from logbook import Logger import eos.db +from service.fit import Fit + pyfalog = Logger(__name__) class FitRenameCommand(wx.Command): - def __init__(self, fitID, newName): - wx.Command.__init__(self, True, "FitRename") + + def __init__(self, fitID, name): + wx.Command.__init__(self, True, 'Rename Fit') self.fitID = fitID - self.newName = newName - self.oldName = None + self.name = name + self.savedName = None def Do(self): - pyfalog.debug("Renaming fit ({0}) to: {1}", self.fitID, self.newName) + pyfalog.debug('Doing renaming of fit {} to {}'.format(self.fitID, self.name)) fit = eos.db.getFit(self.fitID) - self.oldName = fit.name - fit.name = self.newName + self.savedName = fit.name + fit.name = self.name eos.db.commit() return True def Undo(self): - cmd = FitRenameCommand(self.fitID, self.oldName) + pyfalog.debug('Undoing renaming of fit {} to {}'.format(self.fitID, self.name)) + cmd = FitRenameCommand(fitID=self.fitID, name=self.savedName) return cmd.Do() diff --git a/gui/fitCommands/calc/fitReplaceModule.py b/gui/fitCommands/calc/fitReplaceModule.py index 67827a608..9130bd38b 100644 --- a/gui/fitCommands/calc/fitReplaceModule.py +++ b/gui/fitCommands/calc/fitReplaceModule.py @@ -20,7 +20,7 @@ class FitReplaceModuleCommand(wx.Command): self.oldModInfo = None def Do(self): - pyfalog.debug('Doing replacement of module to {} on fit {}'.format(self.newModInfo, self.fitID)) + pyfalog.debug('Doing replacement of module at position {} to {} on fit {}'.format(self.newModInfo, self.position, self.fitID)) sFit = Fit.getInstance() fit = sFit.getFit(self.fitID) oldMod = fit.modules[self.position] @@ -47,11 +47,11 @@ class FitReplaceModuleCommand(wx.Command): return True def Undo(self): - pyfalog.debug('Undoing replacement of module from {} to {} on fit {}'.format(self.oldModInfo, self.newModInfo, self.fitID)) + pyfalog.debug('Undoing replacement of module at position {} to {} on fit {}'.format(self.newModInfo, self.position, self.fitID)) # Remove if there was no module if self.oldModInfo is None: from gui.fitCommands.calc.fitRemoveModule import FitRemoveModuleCommand - cmd = FitRemoveModuleCommand(self.fitID, [self.position]) + cmd = FitRemoveModuleCommand(fitID=self.fitID, positions=[self.position]) return cmd.Do() # Replace if there was sFit = Fit.getInstance() diff --git a/gui/fitCommands/guiAddImplant.py b/gui/fitCommands/guiAddImplant.py index dd6398780..ab660a66f 100644 --- a/gui/fitCommands/guiAddImplant.py +++ b/gui/fitCommands/guiAddImplant.py @@ -6,7 +6,7 @@ from eos.const import ImplantLocation from gui import globalEvents as GE from gui.fitCommands.helpers import ImplantInfo from .calc.fitAddImplant import FitAddImplantCommand -from .calc.fitChangeImplantLocation import FitChangeImplantLocation +from .calc.fitChangeImplantLocation import FitChangeImplantLocationCommand class GuiAddImplantCommand(wx.Command): @@ -21,7 +21,7 @@ class GuiAddImplantCommand(wx.Command): def Do(self): if ( self.internal_history.Submit(FitAddImplantCommand(fitID=self.fitID, implantInfo=ImplantInfo(itemID=self.itemID))) and - self.internal_history.Submit(FitChangeImplantLocation(self.fitID, ImplantLocation.FIT)) + self.internal_history.Submit(FitChangeImplantLocationCommand(self.fitID, ImplantLocation.FIT)) ): self.sFit.recalc(self.fitID) wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID)) diff --git a/gui/fitCommands/guiChangeCargoQty.py b/gui/fitCommands/guiChangeCargoQty.py index 91a992d09..9aa439000 100644 --- a/gui/fitCommands/guiChangeCargoQty.py +++ b/gui/fitCommands/guiChangeCargoQty.py @@ -1,7 +1,7 @@ import wx import gui.mainFrame from gui import globalEvents as GE -from .calc.fitChangeCargoAmount import FitChangeCargoAmount +from .calc.fitChangeCargoAmount import FitChangeCargoAmountCommand from service.fit import Fit from gui.fitCommands.helpers import CargoInfo from logbook import Logger @@ -20,7 +20,7 @@ class GuiChangeCargoQty(wx.Command): self.internal_history = wx.CommandProcessor() def Do(self): - cmd = FitChangeCargoAmount(self.fitID, CargoInfo(itemID=self.itemID, amount=self.amount)) + cmd = FitChangeCargoAmountCommand(self.fitID, CargoInfo(itemID=self.itemID, amount=self.amount)) if self.internal_history.Submit(cmd): self.sFit.recalc(self.fitID) wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID)) diff --git a/gui/fitCommands/guiChangeDroneQty.py b/gui/fitCommands/guiChangeDroneQty.py index 0d8923a2f..abb1f10ab 100644 --- a/gui/fitCommands/guiChangeDroneQty.py +++ b/gui/fitCommands/guiChangeDroneQty.py @@ -1,7 +1,7 @@ import wx import gui.mainFrame from gui import globalEvents as GE -from .calc.fitChangeDroneAmount import FitChangeDroneAmount +from .calc.fitChangeDroneAmount import FitChangeDroneAmountCommand from service.fit import Fit from logbook import Logger pyfalog = Logger(__name__) @@ -18,7 +18,7 @@ class GuiChangeDroneQty(wx.Command): self.internal_history = wx.CommandProcessor() def Do(self): - cmd = FitChangeDroneAmount(self.fitID, self.position, self.amount) + cmd = FitChangeDroneAmountCommand(self.fitID, self.position, self.amount) if self.internal_history.Submit(cmd): self.sFit.recalc(self.fitID) wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID)) diff --git a/gui/fitCommands/guiChangeFighterQty.py b/gui/fitCommands/guiChangeFighterQty.py index 45ab22ab1..7ef6556bd 100644 --- a/gui/fitCommands/guiChangeFighterQty.py +++ b/gui/fitCommands/guiChangeFighterQty.py @@ -1,7 +1,7 @@ import wx import gui.mainFrame from gui import globalEvents as GE -from .calc.fitChangeFighterAmount import FitChangeFighterAmount +from .calc.fitChangeFighterAmount import FitChangeFighterAmountCommand from service.fit import Fit from logbook import Logger pyfalog = Logger(__name__) @@ -18,7 +18,7 @@ class GuiChangeFighterQty(wx.Command): self.internal_history = wx.CommandProcessor() def Do(self): - cmd = FitChangeFighterAmount(self.fitID, self.position, self.amount) + cmd = FitChangeFighterAmountCommand(self.fitID, self.position, self.amount) if self.internal_history.Submit(cmd): self.sFit.recalc(self.fitID) wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID)) diff --git a/gui/fitCommands/guiChangeImplantLocation.py b/gui/fitCommands/guiChangeImplantLocation.py index 5d6c57e9d..fe50f9bb8 100644 --- a/gui/fitCommands/guiChangeImplantLocation.py +++ b/gui/fitCommands/guiChangeImplantLocation.py @@ -3,7 +3,7 @@ from service.fit import Fit import gui.mainFrame from gui import globalEvents as GE -from .calc.fitChangeImplantLocation import FitChangeImplantLocation +from .calc.fitChangeImplantLocation import FitChangeImplantLocationCommand class GuiChangeImplantLocation(wx.Command): @@ -16,7 +16,7 @@ class GuiChangeImplantLocation(wx.Command): self.source = source def Do(self): - if self.internal_history.Submit(FitChangeImplantLocation(self.fitID, self.source)): + if self.internal_history.Submit(FitChangeImplantLocationCommand(self.fitID, self.source)): self.sFit.recalc(self.fitID) wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID)) return True diff --git a/gui/fitCommands/guiChangeProjectedDroneQty.py b/gui/fitCommands/guiChangeProjectedDroneQty.py index 7d45324dd..0af8b9170 100644 --- a/gui/fitCommands/guiChangeProjectedDroneQty.py +++ b/gui/fitCommands/guiChangeProjectedDroneQty.py @@ -1,7 +1,7 @@ import wx import gui.mainFrame from gui import globalEvents as GE -from .calc.fitChangeProjectedDroneAmount import FitChangeProjectedDroneAmount +from .calc.fitChangeProjectedDroneAmount import FitChangeProjectedDroneAmountCommand from service.fit import Fit from logbook import Logger pyfalog = Logger(__name__) @@ -18,7 +18,7 @@ class GuiChangeProjectedDroneQty(wx.Command): self.internal_history = wx.CommandProcessor() def Do(self): - cmd = FitChangeProjectedDroneAmount(self.fitID, self.itemID, self.amount) + cmd = FitChangeProjectedDroneAmountCommand(self.fitID, self.itemID, self.amount) if self.internal_history.Submit(cmd): self.sFit.recalc(self.fitID) wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID)) diff --git a/gui/fitCommands/guiChangeProjectedFighterAmount.py b/gui/fitCommands/guiChangeProjectedFighterAmount.py index 60769f10b..949e0cc8e 100644 --- a/gui/fitCommands/guiChangeProjectedFighterAmount.py +++ b/gui/fitCommands/guiChangeProjectedFighterAmount.py @@ -1,7 +1,7 @@ import wx import gui.mainFrame from gui import globalEvents as GE -from .calc.fitChangeProjectedFighterAmount import FitChangeProjectedFighterAmount +from .calc.fitChangeProjectedFighterAmount import FitChangeProjectedFighterAmountCommand from service.fit import Fit from logbook import Logger pyfalog = Logger(__name__) @@ -19,7 +19,7 @@ class GuiChangeProjectedFighterAmount(wx.Command): self.internal_history = wx.CommandProcessor() def Do(self): - cmd = FitChangeProjectedFighterAmount(self.fitID, self.position, self.amount) + cmd = FitChangeProjectedFighterAmountCommand(self.fitID, self.position, self.amount) if self.internal_history.Submit(cmd): self.sFit.recalc(self.fitID) wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID)) diff --git a/gui/fitCommands/guiChangeProjectedFitQty.py b/gui/fitCommands/guiChangeProjectedFitQty.py index 7aa668062..bdce44392 100644 --- a/gui/fitCommands/guiChangeProjectedFitQty.py +++ b/gui/fitCommands/guiChangeProjectedFitQty.py @@ -1,7 +1,7 @@ import wx import gui.mainFrame from gui import globalEvents as GE -from .calc.fitChangeProjectedFitAmount import FitChangeProjectedFitAmount +from .calc.fitChangeProjectedFitAmount import FitChangeProjectedFitAmountCommand from service.fit import Fit from logbook import Logger pyfalog = Logger(__name__) @@ -18,7 +18,7 @@ class GuiChangeProjectedFitQty(wx.Command): self.internal_history = wx.CommandProcessor() def Do(self): - cmd = FitChangeProjectedFitAmount(self.fitID, self.pfitID, self.amount) + cmd = FitChangeProjectedFitAmountCommand(self.fitID, self.pfitID, self.amount) if self.internal_history.Submit(cmd): self.sFit.recalc(self.fitID) wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID))