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):
821821 self ._cancel_action ()
822822 return
823823
824- last_a = []
824+ done_ax = []
825825
826826 for cur_xypress in self ._xypress :
827827 x , y = event .x , event .y
@@ -832,14 +832,9 @@ def _release(self, event):
832832 return
833833
834834 # 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 )
843838
844839 if self ._button_pressed == 1 :
845840 direction = 'in'
You can’t perform that action at this time.
0 commit comments