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

Method Do

gui/fitCommands/gui/projectedFit/add.py:20–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

18 self.amount = amount
19
20 def Do(self):
21 results = []
22 for projectedFitID in self.projectedFitIDs:
23 cmd = CalcAddProjectedFitCommand(fitID=self.fitID, projectedFitID=projectedFitID, amount=self.amount)
24 results.append(self.internalHistory.submit(cmd))
25 success = any(results)
26 sFit = Fit.getInstance()
27 eos.db.flush()
28 sFit.recalc(self.fitID)
29 sFit.fill(self.fitID)
30 eos.db.commit()
31 wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,)))
32 return success
33
34 def Undo(self):
35 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