Skip to content
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

Add set_cursor method to FigureCanvasTk #22294

Merged
merged 1 commit into from
Jan 25, 2022
Merged

Conversation

daniilS
Copy link
Contributor

@daniilS daniilS commented Jan 23, 2022

PR Summary

Since 3.5, NavigationToolbar2.set_cursor is deprecated in favour of FigureCanvasBase.set_cursor. This adds the set_cursor method to FigureCanvasTk to make the cursor respond to move/zoom modes again, and removes it from NavigationToolbar2Tk as the parent NavigationToolbar2.set_cursor just calls FigureCanvasBase.set_cursor now.

I'm setting the cursor for the canvas specifically rather than for the canvas's master as before, as the cursor change should only ever affect the canvas (and not the toolbar, or any sibling widgets if dealing with an embedded plot).

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

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

@QuLogic QuLogic added this to the v3.5.2 milestone Jan 25, 2022
@timhoffm timhoffm merged commit a0af7cc into matplotlib:main Jan 25, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jan 25, 2022
dstansby added a commit that referenced this pull request Jan 25, 2022
…294-on-v3.5.x

Backport PR #22294 on branch v3.5.x (Add set_cursor method to FigureCanvasTk)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants