-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Macosx fixes #9495
Conversation
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.
There was nothing to signal stale state before.
9e25807
to
619e136
Compare
@@ -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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Carreau not auto-backported? |
@meeseeksdev backport to v2.1.x |
Backport PR #9495 on branch v2.1.x
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. |
@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. |
@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. |
Just to confirm this has definitely fixed #9491 for me on the v2.1.x branch. Thanks, @dopplershift ! |
Fixes a couple of mac-specific problems, plus a bit of cleanup:
Fix TextBox widget on MacOSX fails with RuntimeError: Cannot get window extent w/o renderer #9491. Previously draw() on the osx backend was just calling invalidate, which didn't ensure that a draw event actually happened. This resulted in the cached renderer not being available when expected
Fix 3D plot camera-rotation does not update with mouse movement when using the MacOS backend #8814. Nothing in Axes3D was triggering a stale setting on camera rotation; it only called
draw_idle
. While this might be ok on other backends, on OSX it explicitly only redraws when the figure is stale.An alternative to the fix here for #9306 is to call
self.stale = True
inAxes3D.get_proj()
, which is the function that recalculates the projection. What do you think @WeatherGod ?