(self, event)
| 2028 | self.targetfig.canvas.draw() |
| 2029 | |
| 2030 | def _on_reset(self, event): |
| 2031 | with ExitStack() as stack: |
| 2032 | # Temporarily disable drawing on self and self's sliders, and |
| 2033 | # disconnect slider events (as the subplotparams can be temporarily |
| 2034 | # invalid, depending on the order in which they are restored). |
| 2035 | stack.enter_context(cbook._setattr_cm(self, drawon=False)) |
| 2036 | for slider in self._sliders: |
| 2037 | stack.enter_context( |
| 2038 | cbook._setattr_cm(slider, drawon=False, eventson=False)) |
| 2039 | # Reset the slider to the initial position. |
| 2040 | for slider in self._sliders: |
| 2041 | slider.reset() |
| 2042 | if self.drawon: |
| 2043 | event.canvas.draw() # Redraw the subplottool canvas. |
| 2044 | self._on_slider_changed(None) # Apply changes to the target window. |
| 2045 | |
| 2046 | |
| 2047 | class Cursor(AxesWidget): |
nothing calls this directly
no test coverage detected