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

Method Undo

gui/fitCommands/gui/localModule/clone.py:42–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 return success
41
42 def Undo(self):
43 sFit = Fit.getInstance()
44 fit = sFit.getFit(self.fitID)
45 restoreRemovedDummies(fit, self.savedRemovedDummies)
46 success = self.internalHistory.undoAll()
47 eos.db.flush()
48 sFit.recalc(self.fitID)
49 sFit.fill(self.fitID)
50 eos.db.commit()
51 if success and self.savedItemID is not None:
52 event = GE.FitChanged(fitIDs=(self.fitID,), action='moddel', typeID=self.savedItemID)
53 else:
54 event = GE.FitChanged(fitIDs=(self.fitID,))
55 wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), event)
56 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