summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_filter_ewma2
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-12-31 09:02:29 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-12-31 09:02:29 +0100
commit2c88cc23a4b68261a43895ecc5197658bbe20884 (patch)
tree676e1bee1145e7d63458872abbeccc2279a0370b /ftnoir_filter_ewma2
parentfaec4fed35fc7e30ba50143a4f7cdbbd68fb0508 (diff)
ewma: discard settings on cancel
Diffstat (limited to 'ftnoir_filter_ewma2')
-rw-r--r--ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp
index e452c6f0..7ab2b09c 100644
--- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp
+++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp
@@ -61,7 +61,7 @@ void FilterControls::doCancel() {
// Ask if changed Settings should be saved
//
if (s.b->modifiedp()) {
- int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
+ int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
qDebug() << "doCancel says: answer =" << ret;
@@ -71,13 +71,11 @@ void FilterControls::doCancel() {
this->close();
break;
case QMessageBox::Discard:
+ s.b->revert();
this->close();
break;
case QMessageBox::Cancel:
- // Cancel was clicked
- break;
default:
- // should never be reached
break;
}
}