File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -4141,8 +4141,9 @@ def _on_key_release(self, event):
41414141 self ._remove_box ()
41424142 self .set_visible (True )
41434143
4144- def _draw_polygon (self ):
4145- """Redraw the polygon based on the new vertex positions."""
4144+ def _draw_polygon_without_update (self ):
4145+ """Redraw the polygon based on the new vertex positions, no update().
4146+ """
41464147 xs , ys = zip (* self ._xys ) if self ._xys else ([], [])
41474148 self ._selection_artist .set_data (xs , ys )
41484149 self ._update_box ()
@@ -4155,6 +4156,10 @@ def _draw_polygon(self):
41554156 self ._polygon_handles .set_data (xs [:- 1 ], ys [:- 1 ])
41564157 else :
41574158 self ._polygon_handles .set_data (xs , ys )
4159+
4160+ def _draw_polygon (self ):
4161+ """Redraw the polygon based on the new vertex positions."""
4162+ self ._draw_polygon_without_update ()
41584163 self .update ()
41594164
41604165 @property
@@ -4177,11 +4182,10 @@ def verts(self, xys):
41774182 self ._add_box ()
41784183 self ._draw_polygon ()
41794184
4180- def clear (self ):
4181- super (). clear ()
4185+ def _clear_without_update (self ):
4186+ self . _selection_completed = False
41824187 self ._xys = [(0 , 0 )]
4183- self .set_visible (True )
4184- self ._draw_polygon ()
4188+ self ._draw_polygon_without_update ()
41854189
41864190
41874191class Lasso (AxesWidget ):
You can’t perform that action at this time.
0 commit comments