Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
FIX: only try to update blit caches if the canvas we expect#25085
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
eaf59b5 to9cec214Comparelib/matplotlib/widgets.py Outdated
| def_clear(self,event): | ||
| """Internal event handler to clear the buttons.""" | ||
| ifself.ignore(event): | ||
| ifself.ignore(event)orself.canvasisnotself.ax.figure.canvas: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I wonder if you want to wrap this in a small method with an explanation like your explanation below as the doc string:
def _not_orig_canvas(): """ Explain """" return self.canvas is not self.ax.figure.canvasPerhaps thats too much cruft, but otherwise this is a bit of a mysterious clause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
done.
Because we may switch the canvas to a different type (that may notsupport blitting) when saving, check it `_clear` that the current canvasis the canvas we expect when we update the blitting caches on thedraw_event callback.Closesmatplotlib#25075
9cec214 tob88acdbCompareksunden commentedFeb 8, 2023
Did the rebase as it was the result of conflicts with undeprecating |
There is not a singular canvas
b88acdb tofaa4816Comparejklymak commentedFeb 9, 2023
Anyone should merge when Azure finally times out ;-) |
ksunden commentedFeb 9, 2023
I'm pretty sure the failed Azure test was just a known somewhat flaky test... but it was in fact |
…the canvas we expect
…085-on-v3.7.xBackport PR#25085 on branch v3.7.x (FIX: only try to update blit caches if the canvas we expect)
Because we may switch the canvas to a different type (that may not support blitting) when saving, check it
_clearthat the current canvas is the canvas we expect when we update the blitting caches on the draw_event callback.Closes#25075