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):
4141
4141
self ._remove_box ()
4142
4142
self .set_visible (True )
4143
4143
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
+ """
4146
4147
xs , ys = zip (* self ._xys ) if self ._xys else ([], [])
4147
4148
self ._selection_artist .set_data (xs , ys )
4148
4149
self ._update_box ()
@@ -4155,6 +4156,10 @@ def _draw_polygon(self):
4155
4156
self ._polygon_handles .set_data (xs [:- 1 ], ys [:- 1 ])
4156
4157
else :
4157
4158
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 ()
4158
4163
self .update ()
4159
4164
4160
4165
@property
@@ -4177,11 +4182,10 @@ def verts(self, xys):
4177
4182
self ._add_box ()
4178
4183
self ._draw_polygon ()
4179
4184
4180
- def clear (self ):
4181
- super (). clear ()
4185
+ def _clear_without_update (self ):
4186
+ self . _selection_completed = False
4182
4187
self ._xys = [(0 , 0 )]
4183
- self .set_visible (True )
4184
- self ._draw_polygon ()
4188
+ self ._draw_polygon_without_update ()
4185
4189
4186
4190
4187
4191
class Lasso (AxesWidget ):
You can’t perform that action at this time.
0 commit comments