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

Method removeModule

gui/builtinViews/fittingView.py:419–431  ·  view source on GitHub ↗

Removes a list of modules from the fit

(self, modules)

Source from the content-addressed store, hash-verified

417 self.click(event)
418
419 def removeModule(self, modules):
420 """Removes a list of modules from the fit"""
421 if not isinstance(modules, list):
422 modules = [modules]
423
424 fit = Fit.getInstance().getFit(self.activeFitID)
425 positions = []
426 for position, mod in enumerate(fit.modules):
427 if mod in modules:
428 positions.append(position)
429
430 self.mainFrame.command.Submit(cmd.GuiRemoveLocalModuleCommand(
431 fitID=self.activeFitID, positions=positions))
432
433 def addModule(self, x, y, itemID):
434 """Add a module from the market browser (from dragging it)"""

Callers 2

kbEventMethod · 0.95
removeItemMethod · 0.95

Calls 3

getFitMethod · 0.80
getInstanceMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected