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

Method addFit

gui/builtinContextMenus/commandFitAdd.py:52–60  ·  view source on GitHub ↗
(self, menu, fit, includeShip=False)

Source from the content-addressed store, hash-verified

50 return _t("Command Fits")
51
52 def addFit(self, menu, fit, includeShip=False):
53 label = fit.name if not includeShip else "({}) {}".format(fit.ship.item.name, fit.name)
54 if not label:
55 label = ' '
56 id = ContextMenuUnconditional.nextID()
57 self.fitMenuItemIds[id] = fit
58 menuItem = wx.MenuItem(menu, id, label)
59 menu.Bind(wx.EVT_MENU, self.handleSelection, menuItem)
60 return menuItem
61
62 def getSubMenu(self, callingWindow, context, rootMenu, i, pitem):
63 msw = True if "wxMSW" in wx.PlatformInfo else False

Callers 2

getSubMenuMethod · 0.95
handleSelectionMethod · 0.45

Calls 1

nextIDMethod · 0.80

Tested by

no test coverage detected