You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide public access to the toolbar state for widget interaction #2694
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).
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.
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.
In MEP22 #2759 NavigationBase class, there is a new method get_active that returns a dictionnary with the currently toggled tool, and a list of the registered tool instances
MEP22 solved this problem. fig.canvas.manager.toolmanager.active_toggle returns the currently toggled tools
I'm closing this issue, please reopen if necessary
Activity
tacaswell commentedon Dec 26, 2013
@fariza Can you take a look at this?
fariza commentedon Dec 27, 2013
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.
fariza commentedon Dec 27, 2013
@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.
tacaswell commentedon Dec 27, 2013
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.
fariza commentedon Jan 7, 2014
@tacaswell I am working on the MEP for the split, please checkit out
https://github.com/matplotlib/matplotlib/wiki/Mep22
fariza commentedon Jan 22, 2014
@tacaswell please add MEP22 label
fariza commentedon Jan 24, 2014
In MEP22 #2759 NavigationBase class, there is a new method
get_activethat returns a dictionnary with the currently toggled tool, and a list of the registered tool instancesfariza commentedon Aug 7, 2015
MEP22 solved this problem.
fig.canvas.manager.toolmanager.active_togglereturns the currently toggled toolsI'm closing this issue, please reopen if necessary