-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Provide public access to the toolbar state for widget interaction #2694
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
Comments
@fariza Can you take a look at this? |
This raises a very important point in the split of navigation and toolbar. On the side of navigation there should be a public state. the api should allow to add/remove/disable/enable states. On the toolbar side the buttons that respond to changes in the states should be converted to radio buttons. And again a new api to add/remove/etc... buttons. Right after #2624 I will restart the discussion on this split, I will make sure this state handling is included. |
@tacaswell Do you recommend doing the split based on a MEP? Or straight with a PR? I am just asking to know what option have more chances of speedier review and approval. |
I am not sure the best way to do it. You can see how well my major re-factor is going with a straight PR. Given that you are blocked by #2624, I think writing out a MEP with all the api details would be good because the discussion on that can happen in parallel. |
@tacaswell I am working on the MEP for the split, please checkit out |
@tacaswell please add MEP22 label |
In MEP22 #2759 NavigationBase class, there is a new method |
MEP22 solved this problem. |
Currently the state of the MPL toolbar is not publicly available and must be accessed via
fig.canvas.manager.toolbar._active
. Accessing via_active
is dangerous as it is private and could potentially be altered without notice [link].(http://stackoverflow.com/questions/20711148/ignore-matplotlib-cursor-widget-when-toolbar-widget-selected/20712813#20712813.)Is it possible to provide public access to the toolbar state so that widgets can 'fire' only when a toolbar item is not selected. As an example, if a cursor widget is used to generate subplots, it currently generates a subplot based on the point of an initial pan or zoom request (toolbar item).
@tacaswell
The text was updated successfully, but these errors were encountered: