Skip to content

Conversation

@tacaswell
Copy link
Member

The goal is to skip trying to do anything with blitting when after the figure is closed a blitting-capable Canvas instance is swapped out for one that does not support blitting.

closes #30575 but in only a partial solution to the bigger issues with blitting and changing the canvas.

PR summary

Attempts to make useblit dynamic (and standardiizes it across all of the widget classes)

Not tested with MNE's case and have not sorted out a MWE to add a test.

PR checklist

The goal is to skip trying to do anything with blitting when
after the figure is closed a blitting-capable Canvas instance is
swapped out for one that does not support blitting.

closes matplotlib#30575 but in only a partial solution to the bigger issues
with blitting and changing the canvas.
@timhoffm
Copy link
Member

timhoffm commented Oct 3, 2025

I think this PR is a bit dangerous by itself. It makes sure that the the useblit status calculated dynamically and thus correctly. However we sometimes have state (background images) that are calculated based on the useblit status and canvas at some point in time. If that is not correctly updated as well, we'll still get inconsistent behavior.

I've taken a more comprehensive approach in #30591, see in particular #30591 (comment)

@tacaswell
Copy link
Member Author

Closing this in favor of #30591.

Sorry for the duplicate effort.

@tacaswell tacaswell closed this Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Regression in widget behavior

2 participants