(self, event)
| 186 | self.draw() |
| 187 | |
| 188 | def OnEffectiveHpToggled(self, event): |
| 189 | event.Skip() |
| 190 | currentView = self.getView() |
| 191 | # Redraw graph if needed |
| 192 | if currentView.usesHpEffectivity: |
| 193 | currentView.isEffective = event.effective |
| 194 | self.ctrlPanel.refreshAxeLabels(restoreSelection=True) |
| 195 | self.Layout() |
| 196 | self.clearCache(reason=GraphCacheCleanupReason.hpEffectivityChanged) |
| 197 | # Data has to be recalculated - delay redraw |
| 198 | # to give time to finish UI update in main window |
| 199 | self.drawTimer.Stop() |
| 200 | self.drawTimer.Start(REDRAW_DELAY, True) |
| 201 | # Even if graph is not selected, keep it updated |
| 202 | for idx in range(self.graphSelection.GetCount()): |
| 203 | view = self.getView(idx=idx) |
| 204 | if view is currentView: |
| 205 | continue |
| 206 | if view.usesHpEffectivity: |
| 207 | view.isEffective = event.effective |
| 208 | |
| 209 | def OnGraphSwitched(self, event): |
| 210 | view = self.getView() |
nothing calls this directly
no test coverage detected