Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2804be4

Browse files
committed
Ignore events when axes are invisible
1 parent c364a92 commit 2804be4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ def connect_default_events(self):
11451145

11461146
def ignore(self, event):
11471147
"""return *True* if *event* should be ignored"""
1148-
if not self.active:
1148+
if not self.active or not self.ax.get_visible():
11491149
return True
11501150

11511151
# If canvas was locked

0 commit comments

Comments
 (0)