Update the cursor after a mouse move event or a tool (de)activation.
(self, event)
| 3043 | self._update_view() |
| 3044 | |
| 3045 | def _update_cursor(self, event): |
| 3046 | """ |
| 3047 | Update the cursor after a mouse move event or a tool (de)activation. |
| 3048 | """ |
| 3049 | if self.mode and event.inaxes and event.inaxes.get_navigate(): |
| 3050 | if (self.mode == _Mode.ZOOM |
| 3051 | and self._last_cursor != tools.Cursors.SELECT_REGION): |
| 3052 | self.canvas.set_cursor(tools.Cursors.SELECT_REGION) |
| 3053 | self._last_cursor = tools.Cursors.SELECT_REGION |
| 3054 | elif (self.mode == _Mode.PAN |
| 3055 | and self._last_cursor != tools.Cursors.MOVE): |
| 3056 | self.canvas.set_cursor(tools.Cursors.MOVE) |
| 3057 | self._last_cursor = tools.Cursors.MOVE |
| 3058 | elif self._last_cursor != tools.Cursors.POINTER: |
| 3059 | self.canvas.set_cursor(tools.Cursors.POINTER) |
| 3060 | self._last_cursor = tools.Cursors.POINTER |
| 3061 | |
| 3062 | @contextmanager |
| 3063 | def _wait_cursor_for_draw_cm(self): |
no test coverage detected