8000 call set cursor on zoom/pan toggle · matplotlib/matplotlib@4a910ba · GitHub
[go: up one dir, main page]

Skip to content
Sign in

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4a910ba

Browse files
committed
call set cursor on zoom/pan toggle
1 parent 561462f commit 4a910ba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2456,9 +2456,11 @@ def key_press_handler(event, canvas, toolbar=None):
24562456
# pan mnemonic (default key 'p')
24572457
elif event.key in pan_keys:
24582458
toolbar.pan()
2459+
toolbar._set_cursor(event)
24592460
# zoom mnemonic (default key 'o')
24602461
elif event.key in zoom_keys:
24612462
toolbar.zoom()
2463+
toolbar._set_cursor(event)
24622464
# saving current figure (default key 's')
24632465
elif event.key in save_keys:
24642466
toolbar.save_figure()
@@ -2739,7 +2741,7 @@ class implementation.
27392741
"""
27402742
raise NotImplementedError
27412743

2742-
def mouse_move(self, event):
2744+
def _set_cursor(self, event):
27432745
if not event.inaxes or not self._active:
27442746
if self._lastCursor != cursors.POINTER:
27452747
self.set_cursor(cursors.POINTER)
@@ -2755,6 +2757,9 @@ def mouse_move(self, event):
27552757

27562758
self._lastCursor = cursors.MOVE
27572759

2760+
def mouse_move(self, event):
2761+
self._set_cursor(event)
2762+
27582763
if event.inaxes and event.inaxes.get_navigate():
27592764

27602765
try:

0 commit comments

Comments
 (0)
0