Skip to content

Parent tk StringVar to the canvas widget, not to the toolbar. #28077

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 1 commit into from
Apr 15, 2024

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Apr 15, 2024

... because the toolbar may be a fake object (when using rcParams["toolbar"] = "toolmanager").

Try with rcParams["toolbar"] = "toolmanager; use("tkagg") and interactively saving the picture. No automated tests, sorry.

Closes #28069 (I chose not to parent to None as suggested in the original issue because I'm not 100% sure this won't lead to variables being progressively leaked into tk's global namespace.)

Looks like a regression in 3.8 (#24531), so let's try to get this in 3.9.

PR summary

PR checklist

... because the toolbar may be a fake object (when using
rcParams["toolbar"] = "toolmanager").

Try with `rcParams["toolbar"] = "toolmanager; use("tkagg")` and
interactively saving the picture.  No automated tests, sorry.
@anntzer anntzer added MEP: MEP22 tool manager GUI: tk labels Apr 15, 2024
@anntzer anntzer added this to the v3.9.0 milestone Apr 15, 2024
@timhoffm timhoffm merged commit 364a67b into matplotlib:main Apr 15, 2024
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Apr 15, 2024
@anntzer anntzer deleted the tktm branch April 15, 2024 13:49
ksunden added a commit that referenced this pull request Apr 17, 2024
…077-on-v3.9.x

Backport PR #28077 on branch v3.9.x (Parent tk StringVar to the canvas widget, not to the toolbar.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Can't save with custom toolbar
3 participants