MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / Undo

Method Undo

gui/fitCommands/gui/localModule/add.py:38–52  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36 return success
37
38 def Undo(self):
39 sFit = Fit.getInstance()
40 fit = sFit.getFit(self.fitID)
41 restoreRemovedDummies(fit, self.savedRemovedDummies)
42 success = self.internalHistory.undoAll()
43 eos.db.flush()
44 sFit.recalc(self.fitID)
45 sFit.fill(self.fitID)
46 eos.db.commit()
47 wx.PostEvent(
48 gui.mainFrame.MainFrame.getInstance(),
49 GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.itemID)
50 if success else
51 GE.FitChanged(fitIDs=(self.fitID,)))
52 return success

Callers

nothing calls this directly

Calls 7

restoreRemovedDummiesFunction · 0.90
getFitMethod · 0.80
undoAllMethod · 0.80
flushMethod · 0.80
recalcMethod · 0.80
getInstanceMethod · 0.45
fillMethod · 0.45

Tested by

no test coverage detected