Skip to content

Commit

Permalink
try again to standardize macos
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeFavelier committed Feb 21, 2022
1 parent 9ae9368 commit a0086b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions mne/gui/_coreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1761,10 +1761,8 @@ def _close_dialog_callback(self, button_name):
self._accept_close_event = False
elif button_name == "Cancel":
self._accept_close_event = False
# This should pass, but in case Windows has a different name for this
# than Linux and macOS, let's just skip it...
# else:
# assert button_name in ("Discard", "Don't Save"), button_name
else:
assert button_name == "Discard"

def _close_callback(self):
if self._trans_modified or self._mri_fids_modified or \
Expand Down
2 changes: 1 addition & 1 deletion mne/viz/backends/_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def func(button):
button_name = button.text().replace('&', '')
# handle MacOS Discard button
button_name = "Discard" \
if button_name == "Don't save" else button_name
if button_name == "Don't Save" else button_name

This comment has been minimized.

Copy link
@larsoner

larsoner Feb 21, 2022

Member

You checked windows to make sure this is correct there?

callback(button_name)

widget.buttonClicked.connect(func)
Expand Down

0 comments on commit a0086b7

Please sign in to comment.