Fix an issue which caused pyfa to crash (turns out instantiating the commands in the init was not a good idea)

This commit is contained in:
blitzmann
2018-08-16 00:24:31 -04:00
parent 3d4b41d135
commit bcbed3df39
19 changed files with 60 additions and 52 deletions

View File

@@ -12,11 +12,10 @@ class GuiRemoveCommandCommand(wx.Command):
self.sFit = Fit.getInstance()
self.internal_history = wx.CommandProcessor()
self.fitID = fitID
# can set his up no to not have to set variables on our object
self.cmd = FitRemoveCommandCommand(fitID, commandFitID)
self.commandFitID = commandFitID
def Do(self):
if self.internal_history.Submit(self.cmd):
if self.internal_history.Submit(FitRemoveCommandCommand(self.fitID, self.commandFitID)):
self.sFit.recalc(self.fitID)
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.fitID))
return True