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

Skip to content

Commit c9775ab

Browse files
committed
Ignore events when axes are invisible
1 parent f2e0d89 commit c9775ab

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
@@ -1182,7 +1182,7 @@ def connect_default_events(self):
11821182

11831183
def ignore(self, event):
11841184
"""return *True* if *event* should be ignored"""
1185-
if not self.active:
1185+
if not self.active or not self.ax.get_visible():
11861186
return True
11871187

11881188
# If canvas was locked

0 commit comments

Comments
 (0)