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

Skip to content

Macosx fixes #9495

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 3 commits into from
Oct 21, 2017
Merged

Macosx fixes #9495

merged 3 commits into from
Oct 21, 2017

Conversation

dopplershift
Copy link
Contributor

@dopplershift dopplershift commented Oct 20, 2017

Fixes a couple of mac-specific problems, plus a bit of cleanup:

An alternative to the fix here for #9306 is to call self.stale = True in Axes3D.get_proj(), which is the function that recalculates the projection. What do you think @WeatherGod ?

Remove unused import and simplify a conditional.
draw() needs to ensure events are flushed before returning, so do so
(that's the difference between draw and draw_idle). It turns out
flush_event wasn't being used up to this point.
@dopplershift dopplershift added this to the v2.1.1 milestone Oct 20, 2017
@dopplershift dopplershift added GUI: MacOSX topic: mplot3d Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. labels Oct 20, 2017
There was nothing to signal stale state before.
@@ -1206,6 +1206,7 @@ def _on_move(self, event):
self.elev = art3d.norm_angle(self.elev - (dy/h)*180)
self.azim = art3d.norm_angle(self.azim - (dx/w)*180)
self.get_proj()
self.stale = True
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, this makes sense. Don't forget to do it for the zoom action below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Zoom doesn’t need it because the calls to set limits already take care of setting stale.

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

Would like someone who actually has a mac to test this before merge.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

I tested against both the bug reports using MacOSx frameworks version (pythonw) and both examples (#9491 and #8814) worked as they were supposed to. If I use master both examples fail. So, I think these fixes have addressed the issues.

@jklymak jklymak merged commit a57d436 into matplotlib:master Oct 21, 2017
@QuLogic
Copy link
Member

QuLogic commented Oct 21, 2017

@Carreau not auto-backported?

@tacaswell
Copy link
Member

@meeseeksdev backport to v2.1.x

lumberbot-app bot pushed a commit that referenced this pull request Oct 21, 2017
tacaswell added a commit that referenced this pull request Oct 21, 2017
@Carreau
Copy link
Contributor

Carreau commented Oct 21, 2017

@Carreau not auto-backported?

The bot react only to a list of whitelisted users (for security, until further review of the code, regardless of the event type), @jklymak was not whitelisted, so the bot bailed out. I've added @jklymak to the list of whitelisted user and will find some time to remove the whitelist codepath from "merge" events, as these can only be performed by trusted users.

@jklymak
Copy link
Member

jklymak commented Oct 21, 2017

@Carreau Not sure if I should be whitelisted. I'm pretty new. However if the back porting is just something we are automatically doing w/ master-merged PRs I'm fine /w doing it.

@Carreau
Copy link
Contributor

Carreau commented Oct 21, 2017

@jklymak the bot does not (or should not) do anything that the person triggering it can't already do. So it's pretty safe to add someone to the white list. The only thing you won't have access are the log of the bot and redeploying it; but that could also be arranged.

@tmdavison
Copy link
Contributor

Just to confirm this has definitely fixed #9491 for me on the v2.1.x branch. Thanks, @dopplershift !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI: MacOSX Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: mplot3d
Projects
None yet
7 participants