FIX: put Nav Home view back inside pan/zoom #9958
Merged
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,draw
is 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