8000 Move artist sort to within if block · matplotlib/matplotlib@8ce3a6f · GitHub
[go: up one dir, main page]

Skip to content

Commit 8ce3a6f

Browse files
committed
Move artist sort to within if block
1 parent cd0e52b commit 8ce3a6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2797,8 +2797,9 @@ def mouse_move(self, event):
27972797
artists = event.inaxes.hitlist(event)
27982798
if event.inaxes.patch in artists:
27992799
artists.remove(event.inaxes.patch)
2800-
artists.sort(key=lambda x: x.zorder)
2800+
28012801
if artists:
2802+
artists.sort(key=lambda x: x.zorder)
28022803
a = artists[-1]
28032804
data = a.get_cursor_data(event)
28042805
if data is not None:

0 commit comments

Comments
 (0)
0