Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix _close() on MNEAnnotationsFigure and MNESelectionFigure #13086

Merged
merged 3 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion tutorials/epochs/60_make_fixed_length_epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
We will also briefly demonstrate how to use these epochs in connectivity
analysis.

First, we import necessary modules and read in a sample raw data set.
First, we import the necessary modules and read in a sample raw data set.
This data set contains brain activity that is event-related, i.e.,
synchronized to the onset of auditory stimuli. However, rather than creating
epochs by segmenting the data around the onset of each stimulus, we will
Expand Down
Loading