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

Method Do

gui/fitCommands/gui/implant/remove.py:20–34  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

18 self.positions = positions
19
20 def Do(self):
21 sMkt = Market.getInstance()
22 results = []
23 for position in sorted(self.positions, reverse=True):
24 cmd = CalcRemoveImplantCommand(fitID=self.fitID, position=position)
25 results.append(self.internalHistory.submit(cmd))
26 sMkt.storeRecentlyUsed(cmd.savedImplantInfo.itemID)
27 success = any(results)
28 eos.db.flush()
29 sFit = Fit.getInstance()
30 sFit.recalc(self.fitID)
31 sFit.fill(self.fitID)
32 eos.db.commit()
33 wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,)))
34 return success
35
36 def Undo(self):
37 success = self.internalHistory.undoAll()

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected