aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHartmut Riesenbeck <hartmut.riesenbeck@gmx.de>2016-10-31 20:47:23 (GMT)
committerHartmut Riesenbeck <hartmut.riesenbeck@gmx.de>2016-10-31 20:47:23 (GMT)
commit63f15ce822537b82c25fc5462ccb01fe1c06acfc (patch)
tree07b088cf862ee562e3379f69e698c03742a803b3
parentb2ddc4a2bf4147ad5c435d4199e1cfc8f4176aba (diff)
Fix for configuration file saving
Config file was only saved when document was modified on closing the application. This was corrected to safe the config file every time the application quits.
-rw-r--r--src/parleydocument.cpp2
-rw-r--r--src/parleymainwindow.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/parleydocument.cpp b/src/parleydocument.cpp
index 8c4baf5..f4ca685 100644
--- a/src/parleydocument.cpp
+++ b/src/parleydocument.cpp
@@ -279,8 +279,6 @@ bool ParleyDocument::queryClose()
return true;
}
- Prefs::self()->save();
-
bool canSave = Prefs::autoSave(); //save without asking
if (!canSave) {
diff --git a/src/parleymainwindow.cpp b/src/parleymainwindow.cpp
index 9fd1b92..5f774a5 100644
--- a/src/parleymainwindow.cpp
+++ b/src/parleymainwindow.cpp
@@ -209,7 +209,11 @@ void ParleyMainWindow::practiceFinished()
bool ParleyMainWindow::queryClose()
{
- return m_document->queryClose();
+ if (m_document->queryClose()) {
+ Prefs::self()->save();
+ return true;
+ }
+ return false;
}
QSize ParleyMainWindow::sizeHint() const