Debug use: toggle effects on/off. Affects *ALL* items that use that effect. Is not stateful. Will reset if Pyfa is closed and reopened.
(self, event)
| 80 | self.Layout() |
| 81 | |
| 82 | def OnClick(self, event): |
| 83 | """ |
| 84 | Debug use: toggle effects on/off. |
| 85 | Affects *ALL* items that use that effect. |
| 86 | Is not stateful. Will reset if Pyfa is closed and reopened. |
| 87 | """ |
| 88 | |
| 89 | try: |
| 90 | activeByDefault = getattr(self.item.effects[event.GetText()], "activeByDefault") |
| 91 | if activeByDefault: |
| 92 | setattr(self.item.effects[event.GetText()], "activeByDefault", False) |
| 93 | else: |
| 94 | setattr(self.item.effects[event.GetText()], "activeByDefault", True) |
| 95 | |
| 96 | except AttributeError: |
| 97 | # Attribute doesn't exist, do nothing |
| 98 | pass |
| 99 | |
| 100 | self.RefreshValues(event) |
| 101 | |
| 102 | def RefreshValues(self, event): |
| 103 | self.Freeze() |
nothing calls this directly
no test coverage detected