8000 Don't set the never-used Line2D._contains in set_picker. (#24761) · Marvvxi/matplotlib@f82b64f · GitHub
[go: up one dir, main page]

Skip to content

Commit f82b64f

Browse files
anntzerMarvvxi
authored andcommitted
Don't set the never-used Line2D._contains in set_picker. (matplotlib#24761)
The _contains attribute is never accessed anywhere in the library (since the removal of get/set_contains). Note that this patch intentionally doesn't try to disentangle the much more complex interplay between set_picker and set_pickradius...
1 parent 131992a commit f82b64f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/matplotlib/lines.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,7 @@ def set_picker(self, p):
611611
p : float or callable[[Artist, Event], tuple[bool, dict]]
612612
If a float, it is used as the pick radius in points.
613613
"""
614-
if callable(p):
615-
self._contains = p
616-
else:
614+
if not callable(p):
617615
self.set_pickradius(p)
618616
self._picker = p
619617

0 commit comments

Comments
 (0)
0