File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -2813,15 +2813,14 @@ def mouse_move(self, event):
2813
2813
pass
2814
2814
else :
2815
2815
artists = event .inaxes .hitlist (event )
2816
- if event .inaxes .patch in artists :
2817
- artists .remove (event .inaxes .patch )
2818
2816
2819
2817
if artists :
2820
- artists .sort (key = lambda x : x .zorder )
2821
- a = artists [- 1 ]
2822
- data = a .get_cursor_data (event )
2823
- if data is not None :
2824
- s += ' [%s]' % a .format_cursor_data (data )
2818
+ a = max (enumerate (artists ), key = lambda x : x [1 ].zorder )[1 ]
2819
+ if a is not event .inaxes .patch :
2820
+ data = a .get_cursor_data (event )
2821
+ if data is not None :
2822
+ s += ' [%s]' % a .format_cursor_data (data )
2823
+
2825
2824
if len (self .mode ):
2826
2825
self .set_message ('%s, %s' % (self .mode , s ))
2827
2826
else :
You can’t perform that action at this time.
0 commit comments