From 6f00a75f9a2f87f9f6aa0a6af1a2c75e7225d87a Mon Sep 17 00:00:00 2001 From: Marijn van Vliet Date: Wed, 22 Jan 2025 21:23:14 +0200 Subject: [PATCH] fix hasattr() Co-authored-by: Daniel McCloy --- mne/viz/topo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mne/viz/topo.py b/mne/viz/topo.py index dcc99f95e87..5c43d4de48e 100644 --- a/mne/viz/topo.py +++ b/mne/viz/topo.py @@ -384,7 +384,7 @@ def _plot_topo_onpick(event, show_func): fig = orig_ax.figure # If we are doing lasso select, allow it to handle the click instead. - if hasattr("lasso") and event.key in ["control", "ctrl+shift"]: + if hasattr(fig, "lasso") and event.key in ["control", "ctrl+shift"]: return # make sure that the swipe gesture in OS-X doesn't open many figures