(cls, evt)
| 20 | |
| 21 | @classmethod |
| 22 | def fitChanged(cls, evt): |
| 23 | # This fires on a FitChanged event and updates the command fits whenever a command burst module is added or |
| 24 | # removed from a fit. evt.typeID can be either a int or a set (in the case of multiple module deletions) |
| 25 | if evt is None or (getattr(evt, 'action', None) in ("modadd", "moddel") and getattr(evt, 'typeID', None)): |
| 26 | if evt is not None: |
| 27 | ids = getattr(evt, 'typeID') |
| 28 | if not isinstance(ids, set): |
| 29 | ids = {ids} |
| 30 | |
| 31 | if evt is None or not ids.isdisjoint(cls.commandTypeIDs): |
| 32 | # we are adding or removing an item that defines a command fit. Need to refresh fit list |
| 33 | cls.populateFits(evt) |
| 34 | evt.Skip() |
| 35 | |
| 36 | @classmethod |
| 37 | def populateFits(cls, evt): |
nothing calls this directly
no test coverage detected