Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 30ac5e5

Browse files
committed
Fix bug where using zoom tool on polar plot prevents it from panning subsequently
svn path=/branches/v1_0_maint/; revision=8778
1 parent 9027a79 commit 30ac5e5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/matplotlib/backend_bases.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2310,7 +2310,7 @@ def __init__(self, canvas):
23102310
self._init_toolbar()
23112311
self._idDrag=self.canvas.mpl_connect('motion_notify_event', self.mouse_move)
23122312

2313-
self._ids_zoom = None
2313+
self._ids_zoom = []
23142314
self._zoom_mode = None
23152315

23162316
self._button_pressed = None # determined by the button pressed at start
@@ -2576,10 +2576,11 @@ def drag_zoom(self, event):
25762576

25772577
def release_zoom(self, event):
25782578
'the release mouse button callback in zoom to rect mode'
2579-
if not self._xypress: return
2580-
25812579
for zoom_id in self._ids_zoom:
25822580
self.canvas.mpl_disconnect(zoom_id)
2581+
self._ids_zoom = []
2582+
2583+
if not self._xypress: return
25832584

25842585
last_a = []
25852586

0 commit comments

Comments
 (0)