Thanks to visit codestin.com
Credit goes to github.com

Skip to content

self in key_press_handler() should be canvas.manager #919

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

Merged
merged 1 commit into from
Jun 5, 2012

Conversation

mspacek
Copy link
Contributor

@mspacek mspacek commented Jun 4, 2012

Fixes #918

@WeatherGod
Copy link
Member

Looks like it. I presume this fixes it for you?

@efiring
Copy link
Member

efiring commented Jun 4, 2012

My only reservation is that I am fairly sure this is also fixed in another pull request, but I haven't located it yet.

@efiring
Copy link
Member

efiring commented Jun 4, 2012

Found it: #851 has a different fix for this bug, so this requires a more careful look, as well as a decision on the status of #851.

@mspacek
Copy link
Contributor Author

mspacek commented Jun 4, 2012

Yes, my fix works for me. Ah, #851 uses fig_manager = Gcf.get_active() at line 2267 in backend_bases.py to get the manager, instead of canvas.manager. I have no idea which is better.

@WeatherGod
Copy link
Member

My vote is for your method, since "canvas" is what gets passed in, while "Gcf.get_active()" seems like a kludge that happens to work for most situations.

@pelson
Copy link
Member

pelson commented Jun 5, 2012

I agree that this method is preferable (and the correct one).

@other devs: In order to merge, can I just press the "Merge pull request" button or should I merge by command line pull & push?

@efiring
Copy link
Member

efiring commented Jun 5, 2012

On 06/04/2012 09:35 PM, Phil Elson wrote:

I agree that this method is preferable (and the correct one).

@other devs: In order to merge, can I just press the "Merge pull request" button or should I merge by command line pull& push?

If the button is green, push it!

@WeatherGod
Copy link
Member

Quick caveat... always make sure that the PR is to the correct branch first. Also, if you had to do testing of the PR on your system, you might as well do the merging there anyway. Then, if the merge is to the maintenance branch, you will then have to manually perform a merge down to the master branch.

pelson pushed a commit that referenced this pull request Jun 5, 2012
self in key_press_handler() should be canvas.manager
@pelson pelson merged commit 513ac45 into matplotlib:master Jun 5, 2012
@pelson
Copy link
Member

pelson commented Jun 5, 2012

Thanks for fixing this @mspacek, I've merged it onto 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.

key_press_handler(): NameError: global name 'self' is not defined
4 participants