Skip to content

Fix: Prevent Cursor blitting from erasing overlapping axes (#25670)#31368

Open
MohitPal2005 wants to merge 2 commits intomatplotlib:mainfrom
MohitPal2005:fix-blitting-25670
Open

Fix: Prevent Cursor blitting from erasing overlapping axes (#25670)#31368
MohitPal2005 wants to merge 2 commits intomatplotlib:mainfrom
MohitPal2005:fix-blitting-25670

Conversation

@MohitPal2005
Copy link

Fixes #25670.

Bug: When Cursor is used with useblit=True, its background restore operation blindly overwrites any overlapping widgets (like CheckButtons residing in a different axes on the same figure), causing them to flicker or disappear.

Fix: Updated Cursor.onmove to explicitly detect if any other axes overlap with the cursor's main axes bounding box. If an overlap is detected, the overlapping axes are explicitly redrawn before blitting to the canvas, preserving their state. This serves as a localized fix for widget interaction prior to a larger architectural overlay manager.

@github-actions
Copy link

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks. We also ask that you please finish addressing any review comments on this PR and wait for it to be merged (or closed) before opening a new one, as it can be a valuable learning experience to go through the review process.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide.
Please let us know if (and how) you use AI, it will help us give you better feedback on your PR.

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@MohitPal2005
Copy link
Author

Hi team, I pushed the fixes for the ruff styling checks.

I noticed the docs-python3 CircleCI check is failing on the environment setup ([Errno 2] No such file or directory: 'requirements/dev/build-requirements.txt'). Since my changes are strictly isolated to lib/matplotlib/widgets.py, I suspect this might be an unrelated upstream CI issue.

Please let me know if there is anything specific you need me to adjust on my end!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[Bug]: Cursor blitting produces CheckButton issue (backend-agnostic)

1 participant