Skip to content

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

Merged
timhoffm merged 1 commit intomatplotlib:mainfrom
anntzer:tktm
Apr 15, 2024
Merged

Parent tk StringVar to the canvas widget, not to the toolbar.#28077
timhoffm merged 1 commit intomatplotlib:mainfrom
anntzer:tktm

Conversation

@anntzer
Copy link
Copy Markdown
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