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

Method getTabExtraText

gui/builtinAdditionPanes/boosterView.py:234–252  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

232 return boosters
233
234 def getTabExtraText(self):
235 fitID = self.mainFrame.getActiveFit()
236 if fitID is None:
237 return None
238 sFit = Fit.getInstance()
239 fit = sFit.getFit(fitID)
240 if fit is None:
241 return None
242 opt = sFit.serviceFittingOptions["additionsLabels"]
243 # Amount of active boosters
244 if opt == 1:
245 amount = len([b for b in fit.boosters if b.active])
246 return ' ({})'.format(amount) if amount else None
247 # Total amount of boosters
248 elif opt == 2:
249 amount = len(fit.boosters)
250 return ' ({})'.format(amount) if amount else None
251 else:
252 return None

Callers

nothing calls this directly

Calls 3

getFitMethod · 0.80
getActiveFitMethod · 0.45
getInstanceMethod · 0.45

Tested by

no test coverage detected