Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94a2f46

Browse files
committed
Fix draw recursive loop when resizing figure containing Selector using blit.
1 parent 6f4eb6d commit 94a2f46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/widgets.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1737,7 +1737,8 @@ def update_background(self, event):
17371737
self.canvas.draw()
17381738
self.background = self.canvas.copy_from_bbox(self.ax.bbox)
17391739
if needs_redraw:
1740-
self.update()
1740+
for artist in self.artists:
1741+
self.ax.draw_artist(artist)
17411742

17421743
def connect_default_events(self):
17431744
"""Connect the major canvas events to methods."""

0 commit comments

Comments
 (0)