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

Method getTabExtraText

gui/builtinAdditionPanes/commandView.py:256–278  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

254 commandFitIDs=fitIDs))
255
256 def getTabExtraText(self):
257 fitID = self.mainFrame.getActiveFit()
258 if fitID is None:
259 return None
260 sFit = Fit.getInstance()
261 fit = sFit.getFit(fitID)
262 if fit is None:
263 return None
264 opt = sFit.serviceFittingOptions["additionsLabels"]
265 # Amount of active command fits
266 if opt == 1:
267 amount = 0
268 for commandFit in fit.commandFits:
269 info = commandFit.getCommandInfo(fitID)
270 if info is not None and info.active:
271 amount += 1
272 return ' ({})'.format(amount) if amount else None
273 # Total amount of command fits
274 elif opt == 2:
275 amount = len(fit.commandFits)
276 return ' ({})'.format(amount) if amount else None
277 else:
278 return None

Callers

nothing calls this directly

Calls 4

getFitMethod · 0.80
getCommandInfoMethod · 0.80
getActiveFitMethod · 0.45
getInstanceMethod · 0.45

Tested by

no test coverage detected