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

Method Do

gui/fitCommands/gui/commandFit/add.py:19–31  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

17 self.commandFitIDs = commandFitIDs
18
19 def Do(self):
20 results = []
21 for commandFitID in self.commandFitIDs:
22 cmd = CalcAddCommandCommand(fitID=self.fitID, commandFitID=commandFitID)
23 results.append(self.internalHistory.submit(cmd))
24 success = any(results)
25 eos.db.flush()
26 sFit = Fit.getInstance()
27 sFit.recalc(self.fitID)
28 sFit.fill(self.fitID)
29 eos.db.commit()
30 wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,)))
31 return success
32
33 def Undo(self):
34 success = self.internalHistory.undoAll()

Callers

nothing calls this directly

Calls 7

submitMethod · 0.80
flushMethod · 0.80
recalcMethod · 0.80
appendMethod · 0.45
getInstanceMethod · 0.45
fillMethod · 0.45

Tested by

no test coverage detected