Skip to content

Commit

Permalink
Merge branch 'fix-metadata-tutorial' of https://github.com/cbrnr/mne-…
Browse files Browse the repository at this point in the history
…python into pr/cbrnr/12931
  • Loading branch information
hoechenberger committed Nov 4, 2024
2 parents 5cd646b + aba36e7 commit ad4c7ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 4 additions & 6 deletions mne/viz/_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,13 @@ def __call__(self, block, block_vars, gallery_conf):

@contextmanager
def _screenshot_mode(browser):
if hasattr(browser.mne, "toolbar"): # if there is an error, it might not
browser.mne.toolbar.setVisible(False)
browser.statusBar().setVisible(False)
if need_zen := browser.mne.scrollbars_visible:
browser._toggle_zenmode()
try:
yield
finally:
if hasattr(browser.mne, "toolbar"):
browser.mne.toolbar.setVisible(True)
browser.statusBar().setVisible(True)
if need_zen:
browser._toggle_zenmode()


def _mne_qt_browser_screenshot(browser, inst=None, return_type="pixmap"):
Expand Down
1 change: 0 additions & 1 deletion tutorials/epochs/40_autogenerate_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
negativity (ERN), i.e. the ERP component associated with incorrect
behavioral responses.
.. _tut-autogenerate-metadata-preparation:
Preparation
Expand Down

0 comments on commit ad4c7ab

Please sign in to comment.