Rework module state changing

This commit is contained in:
DarkPhoenix
2019-04-13 23:08:49 +03:00
parent 8139d88a52
commit 4522edb814
3 changed files with 61 additions and 78 deletions

View File

@@ -3,7 +3,7 @@ from service.fit import Fit
import gui.mainFrame
from gui import globalEvents as GE
from .calc.fitChangeState import FitChangeStatesCommand
from .calc.fitChangeModuleStates import FitChangeModuleStatesCommand
class GuiModuleStateChangeCommand(wx.Command):
@@ -19,7 +19,7 @@ class GuiModuleStateChangeCommand(wx.Command):
self.internal_history = wx.CommandProcessor()
def Do(self):
if self.internal_history.Submit(FitChangeStatesCommand(self.fitID, self.baseMod, self.modules, self.click)):
if self.internal_history.Submit(FitChangeModuleStatesCommand(self.fitID, self.baseMod, self.modules, self.click)):
self.sFit.recalc(self.fitID)
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID))
return True