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

Method display

gui/builtinContextMenus/itemProject.py:17–31  ·  view source on GitHub ↗
(self, callingWindow, srcContext, mainItem)

Source from the content-addressed store, hash-verified

15 self.mainFrame = gui.mainFrame.MainFrame.getInstance()
16
17 def display(self, callingWindow, srcContext, mainItem):
18 if srcContext not in ("marketItemGroup", "marketItemMisc") or self.mainFrame.getActiveFit() is None:
19 return False
20
21 if mainItem is None:
22 return False
23
24 sFit = Fit.getInstance()
25 fitID = self.mainFrame.getActiveFit()
26 fit = sFit.getFit(fitID)
27
28 if fit.isStructure:
29 return False
30
31 return mainItem.isType("projected")
32
33 def getText(self, callingWindow, itmContext, mainItem):
34 return _t("Project {0} onto Fit").format(itmContext)

Callers

nothing calls this directly

Calls 4

getFitMethod · 0.80
getActiveFitMethod · 0.45
getInstanceMethod · 0.45
isTypeMethod · 0.45

Tested by

no test coverage detected