Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Fix toolmanager x/y scale "togglers".#26580
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Yes, that's much better, thanks for the suggestion. |
timhoffm left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Optionally, you may think of a class name not containing ClassicToolbar . And modulo CI failures.
I actually can't repro the failures locally (tests pass fine) :/ I'll investigate, but do you get them? |
Doc warnings are real:
I'm off-site and cannot run the tests locally right now. |
(I know about the doc failures, I just need to (pick a better base class name and) rerun sphinx with -Omissing_references_write_json=1) |
ToolXScale and ToolYScale actually *cannot* be implemented usingToolToggleBase because a single "toggle" flag cannot store thelog/linear state of *multiple* axes at once (i.e. the behavior ofpressing "l" becomes wrong as soon as there are multiple axes in a givenfigure). Instead these must be plain tools that inspect the actualscale on the axes before deciding what to do.In practice, the easiest is to again reuse the classic toolbarimplementation, as is already done for ToolGrid and ToolMinorGrid.Factor out that "forward-to-classic-toolbar" implementation into a_ToolForwardingToClassicToolbar base class and use that whereeverpossible.
ToolXScale and ToolYScale actuallycannot be implemented using ToolToggleBase because a single "toggle" flag cannot store the log/linear state ofmultiple axes at once (i.e. the behavior of pressing "l" becomes wrong as soon as there are multiple axes in a given figure). Instead these must be plain tools that inspect the actual scale on the axes before deciding what to do.
In practice, the easiest is to again reuse the classic toolbar implementation, as is already done for ToolGrid and ToolMinorGrid. Factor out that "forward-to-classic-toolbar" implementation into a _ToolForwardingToClassicToolbar base class and use that whereever possible.
As in#16823, providing strict backcompat seems too hard to be worth it.
PR summary
PR checklist