Skip to content

Commit

Permalink
Fix _close() on MNEAnnotationsFigure and MNESelectionFigure
Browse files Browse the repository at this point in the history
  • Loading branch information
wmvanvliet committed Jan 25, 2025
1 parent bd8f9cb commit 9146a81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mne/viz/_mpl_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def _inch_to_rel(self, dim_inches, horiz=True):
class MNEAnnotationFigure(MNEFigure):
"""Interactive dialog figure for annotations."""

def _close(self, event):
def _close(self, event=None):
"""Handle close events (via keypress or window [x])."""
parent = self.mne.parent_fig
# disable span selector
Expand Down Expand Up @@ -275,7 +275,7 @@ def _set_active_button(self, idx, *, draw=True):
class MNESelectionFigure(MNEFigure):
"""Interactive dialog figure for channel selections."""

def _close(self, event):
def _close(self, event=None):
"""Handle close events."""
self.mne.parent_fig.mne.child_figs.remove(self)
self.mne.fig_selection = None
Expand Down

0 comments on commit 9146a81

Please sign in to comment.