MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / Undo

Method Undo

gui/fitCommands/calc/module/localAdd.py:62–74  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

60 return True
61
62 def Undo(self):
63 pyfalog.debug('Undoing addition of local module {} to fit {}'.format(self.newModInfo, self.fitID))
64 # We added a subsystem module, which actually ran the replace command. Run the undo for that guy instead
65 if self.subsystemCmd is not None:
66 return self.subsystemCmd.Undo()
67 if self.savedPosition is None:
68 return False
69 from .localRemove import CalcRemoveLocalModulesCommand
70 cmd = CalcRemoveLocalModulesCommand(fitID=self.fitID, positions=[self.savedPosition], recalc=False, clearTail=True)
71 if not cmd.Do():
72 return False
73 restoreCheckedStates(Fit.getInstance().getFit(self.fitID), self.savedStateCheckChanges)
74 return True
75
76 @property
77 def needsGuiRecalc(self):

Callers 1

DoMethod · 0.95

Calls 5

DoMethod · 0.95
restoreCheckedStatesFunction · 0.90
getFitMethod · 0.80
getInstanceMethod · 0.45

Tested by

no test coverage detected