summaryrefslogtreecommitdiffhomepage
path: root/gui/options-dialog.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-02-25 14:07:55 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-02-25 14:19:59 +0100
commitfb691fb6c36b5e21170ba13a5d228e8fcb5e190b (patch)
treec29625a2746ea736841a85cd2bee29118609f846 /gui/options-dialog.cpp
parent35a00c84e56749aab323bfb664cbaeccc984c168 (diff)
gui/options-dialog: prevent escape key closing on Linux
The escape key closed the dialog but prevented save/cancel hooks from being run. Now we get the hooks running twice but it's better than not at all.
Diffstat (limited to 'gui/options-dialog.cpp')
-rw-r--r--gui/options-dialog.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp
index b1dfc472..42b5cc52 100644
--- a/gui/options-dialog.cpp
+++ b/gui/options-dialog.cpp
@@ -200,3 +200,10 @@ void OptionsDialog::doCancel()
emit closing();
}
+void OptionsDialog::done(int res)
+{
+ if (res == QDialog::Accepted)
+ doOK();
+ else
+ doCancel();
+}