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

Method Do

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

Source from the content-addressed store, hash-verified

19 self.savedRemovedDummies = None
20
21 def Do(self):
22 cmd = CalcAddLocalModuleCommand(fitID=self.fitID, newModInfo=ModuleInfo(itemID=self.itemID))
23 success = self.internalHistory.submit(cmd)
24 Market.getInstance().storeRecentlyUsed(self.itemID)
25 sFit = Fit.getInstance()
26 if cmd.needsGuiRecalc:
27 eos.db.flush()
28 sFit.recalc(self.fitID)
29 self.savedRemovedDummies = sFit.fill(self.fitID)
30 eos.db.commit()
31 wx.PostEvent(
32 gui.mainFrame.MainFrame.getInstance(),
33 GE.FitChanged(fitIDs=(self.fitID,), action='modadd', typeID=self.itemID)
34 if success else
35 GE.FitChanged(fitIDs=(self.fitID,)))
36 return success
37
38 def Undo(self):
39 sFit = Fit.getInstance()

Callers

nothing calls this directly

Calls 8

ModuleInfoClass · 0.90
submitMethod · 0.80
storeRecentlyUsedMethod · 0.80
flushMethod · 0.80
recalcMethod · 0.80
getInstanceMethod · 0.45
fillMethod · 0.45

Tested by

no test coverage detected