diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/options-dialog.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp index 356d7cef..8e420a83 100644 --- a/gui/options-dialog.cpp +++ b/gui/options-dialog.cpp @@ -199,18 +199,28 @@ void OptionsDialog::bind_key(key_opts& kopts, QLabel* label) void OptionsDialog::doOK() { + if (!close()) // dialog was closed already + return; + if (isHidden()) // close() can return true twice in a row it seems + return; + hide(); + main.b->save(); ui.game_detector->save(); set_disable_translation_state(ui.disable_translation->isChecked()); - close(); emit closing(); } void OptionsDialog::doCancel() { + if (!close()) // dialog was closed already + return; + if (isHidden()) // close() can return true twice in a row it seems + return; + hide(); + main.b->reload(); ui.game_detector->revert(); - close(); emit closing(); } |