Rework meta swap command
This commit is contained in:
@@ -17,11 +17,10 @@ class GuiAddProjectedModuleCommand(wx.Command):
|
||||
|
||||
def Do(self):
|
||||
cmd = CalcAddProjectedModuleCommand(fitID=self.fitID, modInfo=ModuleInfo(itemID=self.itemID))
|
||||
if self.internalHistory.submit(cmd):
|
||||
Fit.getInstance().recalc(self.fitID)
|
||||
wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID))
|
||||
return True
|
||||
return False
|
||||
success = self.internalHistory.submit(cmd)
|
||||
Fit.getInstance().recalc(self.fitID)
|
||||
wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID))
|
||||
return success
|
||||
|
||||
def Undo(self):
|
||||
success = self.internalHistory.undoAll()
|
||||
|
||||
@@ -18,11 +18,10 @@ class GuiChangeProjectedModuleChargesCommand(wx.Command):
|
||||
|
||||
def Do(self):
|
||||
cmd = CalcChangeModuleChargesCommand(fitID=self.fitID, projected=True, chargeMap={p: self.chargeItemID for p in self.positions})
|
||||
if self.internalHistory.submit(cmd):
|
||||
Fit.getInstance().recalc(self.fitID)
|
||||
wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID))
|
||||
return True
|
||||
return False
|
||||
success = self.internalHistory.submit(cmd)
|
||||
Fit.getInstance().recalc(self.fitID)
|
||||
wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID))
|
||||
return success
|
||||
|
||||
def Undo(self):
|
||||
success = self.internalHistory.undoAll()
|
||||
|
||||
@@ -24,11 +24,10 @@ class GuiChangeProjectedModuleSpoolCommand(wx.Command):
|
||||
position=self.position,
|
||||
spoolType=self.spoolType,
|
||||
spoolAmount=self.spoolAmount)
|
||||
if self.internalHistory.submit(cmd):
|
||||
Fit.getInstance().recalc(self.fitID)
|
||||
wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID))
|
||||
return True
|
||||
return False
|
||||
success = self.internalHistory.submit(cmd)
|
||||
Fit.getInstance().recalc(self.fitID)
|
||||
wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID))
|
||||
return success
|
||||
|
||||
def Undo(self):
|
||||
success = self.internalHistory.undoAll()
|
||||
|
||||
@@ -18,11 +18,10 @@ class GuiChangeProjectedModuleStateCommand(wx.Command):
|
||||
|
||||
def Do(self):
|
||||
cmd = CalcChangeProjectedModuleStateCommand(fitID=self.fitID, position=self.position, click=self.click)
|
||||
if self.internalHistory.submit(cmd):
|
||||
Fit.getInstance().recalc(self.fitID)
|
||||
wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID))
|
||||
return True
|
||||
return False
|
||||
success = self.internalHistory.submit(cmd)
|
||||
Fit.getInstance().recalc(self.fitID)
|
||||
wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID))
|
||||
return success
|
||||
|
||||
def Undo(self):
|
||||
success = self.internalHistory.undoAll()
|
||||
|
||||
@@ -17,11 +17,10 @@ class GuiRemoveProjectedModuleCommand(wx.Command):
|
||||
|
||||
def Do(self):
|
||||
cmd = CalcRemoveProjectedModuleCommand(fitID=self.fitID, position=self.position)
|
||||
if self.internalHistory.submit(cmd):
|
||||
Fit.getInstance().recalc(self.fitID)
|
||||
wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID))
|
||||
return True
|
||||
return False
|
||||
success = self.internalHistory.submit(cmd)
|
||||
Fit.getInstance().recalc(self.fitID)
|
||||
wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitID=self.fitID))
|
||||
return success
|
||||
|
||||
def Undo(self):
|
||||
success = self.internalHistory.undoAll()
|
||||
|
||||
Reference in New Issue
Block a user