File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -821,7 +821,7 @@ def _release(self, event):
821
821
self ._cancel_action ()
822
822
return
823
823
824
- last_a = []
824
+ done_ax = []
825
825
826
826
for cur_xypress in self ._xypress :
827
827
x , y = event .x , event .y
@@ -832,14 +832,9 @@ def _release(self, event):
832
832
return
833
833
834
834
# detect twinx, twiny axes and avoid double zooming
835
- twinx , twiny = False , False
836
- if last_a :
837
- for la in last_a :
838
- if a .get_shared_x_axes ().joined (a , la ):
839
- twinx = True
840
- if a .get_shared_y_axes ().joined (a , la ):
841
- twiny = True
842
- last_a .append (a )
835
+ twinx = any (a .get_shared_x_axes ().joined (a , a1 ) for a1 in done_ax )
836
+ twiny = any (a .get_shared_y_axes ().joined (a , a1 ) for a1 in done_ax )
837
+ done_ax .append (a )
843
838
844
839
if self ._button_pressed == 1 :
845
840
direction = 'in'
You can’t perform that action at this time.
0 commit comments