Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2456,9 +2456,11 @@ def key_press_handler(event, canvas, toolbar=None):
# pan mnemonic (default key 'p')
elif event.key in pan_keys:
toolbar.pan()
toolbar._set_cursor(event)
# zoom mnemonic (default key 'o')
elif event.key in zoom_keys:
toolbar.zoom()
toolbar._set_cursor(event)
# saving current figure (default key 's')
elif event.key in save_keys:
toolbar.save_figure()
Expand Down Expand Up @@ -2739,7 +2741,7 @@ class implementation.
"""
raise NotImplementedError

def mouse_move(self, event):
def _set_cursor(self, event):
if not event.inaxes or not self._active:
if self._lastCursor != cursors.POINTER:
self.set_cursor(cursors.POINTER)
Expand All @@ -2755,6 +2757,9 @@ def mouse_move(self, event):

self._lastCursor = cursors.MOVE

def mouse_move(self, event):
self._set_cursor(event)

if event.inaxes and event.inaxes.get_navigate():

try:
Expand Down