summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-01-05 13:02:52 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-01-05 13:02:52 +0100
commit449625118b3d28baabcdb001595a7dec2f8e3593 (patch)
tree293d5131120072ca5cf74565d5a900f98a8139c7 /facetracknoir
parentbbe8552db3fb0d7ab2c3a26b058c059e5df21eeb (diff)
remove settings dialog copypasted all over, losing functionality
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/curve-config.cpp28
-rw-r--r--facetracknoir/shortcuts.cpp27
2 files changed, 4 insertions, 51 deletions
diff --git a/facetracknoir/curve-config.cpp b/facetracknoir/curve-config.cpp
index b01c2013..f5ed6aa7 100644
--- a/facetracknoir/curve-config.cpp
+++ b/facetracknoir/curve-config.cpp
@@ -49,32 +49,8 @@ void CurveConfigurationDialog::doOK() {
}
void CurveConfigurationDialog::doCancel() {
- //
- // Ask if changed Settings should be saved
- //
- if (settingsDirty || mainApp->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 );
-
- switch (ret) {
- case QMessageBox::Save:
- save();
- this->close();
- break;
- case QMessageBox::Discard:
- mainApp->s.b->revert();
- this->close();
- break;
- case QMessageBox::Cancel:
- // Cancel was clicked
- break;
- default:
- // should never be reached
- break;
- }
- }
- else {
- this->close();
- }
+ mainApp->b->revert();
+ close();
}
//
diff --git a/facetracknoir/shortcuts.cpp b/facetracknoir/shortcuts.cpp
index 2f117ea4..a905be57 100644
--- a/facetracknoir/shortcuts.cpp
+++ b/facetracknoir/shortcuts.cpp
@@ -42,31 +42,8 @@ void KeyboardShortcutDialog::doOK() {
}
void KeyboardShortcutDialog::doCancel() {
- //
- // Ask if changed Settings should be saved
- //
- if (mainApp->b->modifiedp()) {
- 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;
-
- switch (ret) {
- case QMessageBox::Save:
- mainApp->b->save();
- this->close();
- break;
- case QMessageBox::Discard:
- mainApp->b->revert();
- close();
- break;
- case QMessageBox::Cancel:
- default:
- break;
- }
- }
- else {
- this->close();
- }
+ mainApp->b->revert();
+ close();
}
#if defined(_WIN32)