Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simplify 3d axes callback setup.#15855

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 1 commit intomatplotlib:masterfromanntzer:3dcb
Mar 9, 2020
Merged

Conversation

anntzer
Copy link
Contributor

Always setup the 3d mouse rotate/zoom callbacks and don't store their
cids; instead, handle their disconnection by disabling all mouse buttons
(which has the same observable effect).

This is in preparation of restoring the pan/zoom callbacks upon
unpickling (#10843): after a pickle/unpickle cycle, even if we restore the
callbacks, we can't guarantee that the callback numeric ids will stay
the same, and so self._cids would become incorrect.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code isFlake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@WeatherGod
Copy link
Member

I am a little uneasy about this change. How does the regular 2d axes object handle this stuff? I am also realizing that it was possible to accidentally connect multiple sets of the same callbacks through repeated calls, which is technically "fixed" by this..

@anntzer
Copy link
ContributorAuthor

2d axes don't generate their own callbacks (they are completely ignorant of the callback system), they are set up by the canvas (more specifically, by the toolbar) and attached to the canvas object.
When unpickling, the figure is attached to a new canvas who may or may not have a toolbar, which again is in charge of the callbacks.

@timhoffm
Copy link
Member

Please rebase so that Travis can run.

Always setup the 3d mouse rotate/zoom callbacks and don't store theircids; instead, handle their disconnection by disabling all mouse buttons(which has the same observable effect).This is in preparation of restoring the pan/zoom callbacks uponunpickling: after a pickle/unpickle cycle, even if we restore thecallbacks, we can't guarantee that the callback numeric ids will staythe same, and so self._cids would become incorrect.
@anntzer
Copy link
ContributorAuthor

done

@timhoffmtimhoffm added this to thev3.3.0 milestoneMar 9, 2020
@timhoffmtimhoffm merged commit2938c6f intomatplotlib:masterMar 9, 2020
@anntzeranntzer deleted the 3dcb branchMarch 9, 2020 15:46
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.3.0
Development

Successfully merging this pull request may close these issues.

4 participants
@anntzer@WeatherGod@timhoffm@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp