Skip to content
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

checkable pan/zoom buttons for QT NavigationToolbar #1152

Merged
merged 1 commit into from Sep 13, 2012

Conversation

ChrisBeaumont
Copy link
Contributor

This small tweak makes the pan and zoom toolbar buttons "checkable" within the QT backend. This adds some shading around the active navigation mode button, which I find to be a bit clearer than the status bar message.

The check states are re-synchronized at each call to NavigationToolbar2QT.pan and NavigationToolbar2QT.zoom.

@@ -497,6 +497,7 @@ def __init__(self, canvas, parent, coordinates=True):
""" coordinates: should we show the coordinates on the right? """
self.canvas = canvas
self.coordinates = coordinates
self._actions = {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not immediately clear to a reader what this dictionary represents. A sphinx style docstring would be great here:

self._actions = {}
"""A dictionary mapping action names to button instances...."""

I leave the actual contents of the docstring to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback -- I've amended with a docstring

@pelson
Copy link
Member

pelson commented Aug 29, 2012

Looks good to me. +1

@pelson
Copy link
Member

pelson commented Sep 2, 2012

I my eyes, this is ready for merging. The only question is whether it goes in before or after the 1.2 cut.

@mdboom
Copy link
Member

mdboom commented Sep 4, 2012

I think after.

pelson added a commit that referenced this pull request Sep 13, 2012
checkable pan/zoom buttons for QT NavigationToolbar
@pelson pelson merged commit 5864941 into matplotlib:master Sep 13, 2012
@pelson
Copy link
Member

pelson commented Sep 13, 2012

Thanks @ChrisBeaumont for this enhancement. I've merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants