From 2c88cc23a4b68261a43895ecc5197658bbe20884 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 31 Dec 2013 09:02:29 +0100 Subject: ewma: discard settings on cancel --- ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp | 6 ++---- 1 file 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; } } -- cgit v1.2.3