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

Method OnEffectiveHpToggled

graphs/gui/frame.py:188–207  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 4

getViewMethod · 0.95
clearCacheMethod · 0.95
refreshAxeLabelsMethod · 0.80
StopMethod · 0.80

Tested by

no test coverage detected