Repository navigation
Macosx fixes - #9495
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
| 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.
Yeah, this makes sense. Don't forget to do it for the zoom action below.
There was a problem hiding this comment.
Zoom doesn’t need it because the calls to set limits already take care of setting stale.
tacaswell
left a comment
There was a problem hiding this comment.
Would like someone who actually has a mac to test this before merge.
|
@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 = TrueinAxes3D.get_proj(), which is the function that recalculates the projection. What do you think @WeatherGod ?