@@ -1418,6 +1418,8 @@ def __init__(self, ax, onselect, direction, minspan=None, useblit=False,
14181418 if rectprops is None :
14191419 rectprops = dict (facecolor = 'red' , alpha = 0.5 )
14201420
1421+ rectprops ['animated' ] = useblit
1422+
14211423 if direction not in ['horizontal' , 'vertical' ]:
14221424 msg = "direction must be in [ 'horizontal' | 'vertical' ]"
14231425 raise ValueError (msg )
@@ -1726,6 +1728,7 @@ def __init__(self, ax, onselect, drawtype='patch',
17261728 if rectprops is None :
17271729 rectprops = dict (facecolor = 'red' , edgecolor = 'black' ,
17281730 alpha = 0.2 , fill = True )
1731+ rectprops ['animated' ] = useblit
17291732 self .rectprops = rectprops
17301733 self .to_draw = self ._shape_klass ((0 , 0 ),
17311734 0 , 1 , visible = False , ** self .rectprops )
@@ -1734,6 +1737,7 @@ def __init__(self, ax, onselect, drawtype='patch',
17341737 if lineprops is None :
17351738 lineprops = dict (color = 'black' , linestyle = '-' ,
17361739 linewidth = 2 , alpha = 0.5 )
1740+ lineprops ['animated' ] = useblit
17371741 self .lineprops = lineprops
17381742 self .to_draw = Line2D ([0 , 0 , 0 , 0 , 0 ], [0 , 0 , 0 , 0 , 0 ], visible = False ,
17391743 ** self .lineprops )
@@ -1954,8 +1958,7 @@ def extents(self, extents):
19541958 self ._edge_handles .set_data (* self .edge_centers )
19551959 self ._center_handle .set_data (* self .center )
19561960 self .set_visible (self .visible )
1957-
1958- self .canvas .draw_idle ()
1961+ self .update ()
19591962
19601963 def draw_shape (self , extents ):
19611964 x0 , x1 , y0 , y1 = extents
0 commit comments