FIX: put Nav Home view back inside pan/zoom#9958
Merged
anntzer merged 1 commit intomatplotlib:masterfrom Dec 9, 2017
Merged
Conversation
tacaswell
approved these changes
Dec 8, 2017
Contributor
|
I think that's fine for now, we may want to revisit later whether to push the original position when creating the toolbar. |
Member
Author
|
Seems like toolbar is created before any axes are put in place so that doesn’t work. I thought about doing at show somehow but wasn’t clever enough to get it to call with all the different backend show commands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Fixes #9863
The GUI home state was being set on the first
draw()due to PRs #6598 #9359. However,drawis called by some tools to get fontsizes etc, and some users were changing plot parameters after thatdraw().This reverts to the home state being set in Pan and Zoom if the Home state is empty. Other tools should include the same logic if they want to register the Home state when they are called:
Happy if someone has a better solution. Perhaps instead of at draw time, the appropriate time is when the toolbar is created (
NavigationToolbar2.__init__?).The test is the same as in #9863:
PR Checklist