Skip to content

Fix blitting selector #20264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/matplotlib/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1737,7 +1737,8 @@ def update_background(self, event):
self.canvas.draw()
self.background = self.canvas.copy_from_bbox(self.ax.bbox)
if needs_redraw:
self.update()
for artist in self.artists:
self.ax.draw_artist(artist)

def connect_default_events(self):
"""Connect the major canvas events to methods."""
Expand Down Expand Up @@ -1781,6 +1782,8 @@ def update(self):
if self.useblit:
if self.background is not None:
self.canvas.restore_region(self.background)
else:
self.update_background(None)
for artist in self.artists:
self.ax.draw_artist(artist)
self.canvas.blit(self.ax.bbox)
Expand Down