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

Skip to content

Commit b2085ee

Browse files
committed
Merged revisions 8778 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v1_0_maint ........ r8778 | mdboom | 2010-11-08 11:33:23 -0500 (Mon, 08 Nov 2010) | 1 line Fix bug where using zoom tool on polar plot prevents it from panning subsequently ........ svn path=/trunk/matplotlib/; revision=8779
1 parent 5d522db commit b2085ee

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
@@ -2350,7 +2350,7 @@ def __init__(self, canvas):
23502350
self._init_toolbar()
23512351
self._idDrag=self.canvas.mpl_connect('motion_notify_event', self.mouse_move)
23522352

2353-
self._ids_zoom = None
2353+
self._ids_zoom = []
23542354
self._zoom_mode = None
23552355

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

26172617
def release_zoom(self, event):
26182618
'the release mouse button callback in zoom to rect mode'
2619-
if not self._xypress: return
2620-
26212619
for zoom_id in self._ids_zoom:
26222620
self.canvas.mpl_disconnect(zoom_id)
2621+
self._ids_zoom = []
2622+
2623+
if not self._xypress: return
26232624

26242625
last_a = []
26252626

0 commit comments

Comments
 (0)