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

Method display

gui/builtinContextMenus/itemMutations.py:32–43  ·  view source on GitHub ↗
(self, callingWindow, srcContext, mainItem)

Source from the content-addressed store, hash-verified

30 self.eventIDs = {}
31
32 def display(self, callingWindow, srcContext, mainItem):
33
34 if srcContext not in ("fittingModule", "droneItem") or self.mainFrame.getActiveFit() is None:
35 return False
36
37 if mainItem is None or getattr(mainItem, 'isEmpty', False):
38 return False
39
40 if len(mainItem.item.mutaplasmids) == 0 and not mainItem.isMutated:
41 return False
42
43 return True
44
45 def getText(self, callingWindow, itmContext, mainItem):
46 return _t("Apply Mutaplasmid") if not mainItem.isMutated else _t("Revert to {}").format(mainItem.baseItem.name)

Callers

nothing calls this directly

Calls 1

getActiveFitMethod · 0.45

Tested by

no test coverage detected