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

Method __handleModule

gui/builtinContextMenus/itemRemove.py:68–79  ·  view source on GitHub ↗
(self, callingWindow, mainItem, selection)

Source from the content-addressed store, hash-verified

66 handler(callingWindow, mainItem, selection)
67
68 def __handleModule(self, callingWindow, mainItem, selection):
69 fitID = self.mainFrame.getActiveFit()
70 fit = Fit.getInstance().getFit(fitID)
71 if wx.GetMouseState().GetModifiers() in (wx.MOD_ALT, wx.MOD_CONTROL):
72 positions = getSimilarModPositions(fit.modules, mainItem)
73 else:
74 positions = []
75 for mod in selection:
76 if mod in fit.modules:
77 positions.append(fit.modules.index(mod))
78 self.mainFrame.command.Submit(cmd.GuiRemoveLocalModuleCommand(
79 fitID=fitID, positions=positions))
80
81 def __handleDrone(self, callingWindow, mainItem, selection):
82 fitID = self.mainFrame.getActiveFit()

Callers

nothing calls this directly

Calls 5

getSimilarModPositionsFunction · 0.90
getFitMethod · 0.80
getActiveFitMethod · 0.45
getInstanceMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected