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
Deprecate DraggableBase.artist_picker. #16107
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
timhoffm
approved these changes
Jan 5, 2020
anntzer
force-pushed
the
draggableartistpick
branch
2 times, most recently
from
January 7, 2020 09:39
2033ee7
to
5e98493
Compare
anntzer
commented
Jan 7, 2020
@@ -1722,7 +1718,18 @@ def __init__(self, ref_artist, use_blit=False): | |||
c2 = self.canvas.mpl_connect('pick_event', self.on_pick) | |||
c3 = self.canvas.mpl_connect('button_release_event', self.on_release) | |||
|
|||
ref_artist.set_picker(self.artist_picker) | |||
if not ref_artist.pickable(): | |||
ref_artist.set_picker(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.
Additionally, I left the previous picker in place if the user already configured their own.
anntzer
force-pushed
the
draggableartistpick
branch
2 times, most recently
from
January 13, 2020 06:04
c8330dc
to
001d800
Compare
anntzer
force-pushed
the
draggableartistpick
branch
3 times, most recently
from
January 14, 2020 00:37
8863ca0
to
b26efbc
Compare
anntzer
force-pushed
the
draggableartistpick
branch
from
February 9, 2020 21:53
b26efbc
to
30417ff
Compare
dstansby
approved these changes
Feb 10, 2020
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.
Needs a rebase
This method could previously be overridden in order to customize the artist's picker function when dragging it. However, the default picker of all artists is already checking whether the artist contain()s the event; moreover the picker is "global" for the artist so it stays set on it even after making it undraggable. Hence it is really just an artist's property and the user should just call artist.set_picker() if desired.
done |
anntzer
force-pushed
the
draggableartistpick
branch
from
February 10, 2020 19:59
30417ff
to
25d05ac
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
This method could previously be overridden in order to customize the
artist's picker function when dragging it. However, the default picker
of all artists is already checking whether the artist contain()s the
event; moreover the picker is "global" for the artist so it stays set on
it even after making it undraggable. Hence it is really just an
artist's property and the user should just call artist.set_picker() if
desired.
Goes on top of #16106.PR Checklist