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

Skip to content

Fix pan/zoom crashing when widget lock is unavailable #23373

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 2 commits into from
Jul 22, 2022

Conversation

kianelbo
Copy link
Contributor

@kianelbo kianelbo commented Jun 30, 2022

PR Summary

Closes #23324
To fix the crash, when toggling zoom or pan tools, first check if widgetlock is available to proceed.

Btw, I only could test it with MACOSX backend and it was ok.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs should build without error).

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@delsuc
Copy link

delsuc commented Jul 10, 2022

I was able to test the fix in jupyter-notebook, and it works fine.

see: #23324 (comment)

Thanks !

Copy link

@delsuc delsuc left a comment

Choose a reason for hiding this comment

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

@@ -175,6 +175,18 @@ def test_interactive_zoom():
assert not ax.get_autoscalex_on() and not ax.get_autoscaley_on()


# GH #23324
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# GH #23324

@oscargus oscargus added this to the v3.6.0 milestone Jul 22, 2022
@oscargus oscargus merged commit 3ffb560 into matplotlib:main Jul 22, 2022
@oscargus
Copy link
Member

Congratulations on your first Matplotlib contribution @kianelbo and thank you very much! Hope to see you around!

@kianelbo kianelbo deleted the panzoom-lock-fix branch July 22, 2022 11:45
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.

[Bug]: Exception not handled in widgetlock()
5 participants