diff --git a/src/Gui/DlgPreferencesImp.cpp b/src/Gui/DlgPreferencesImp.cpp
index e52d6486ed69..d11ad2d32f79 100644
--- a/src/Gui/DlgPreferencesImp.cpp
+++ b/src/Gui/DlgPreferencesImp.cpp
@@ -36,7 +36,7 @@
#include
#include
-
+#include
#include "DlgPreferencesImp.h"
#include "ui_DlgPreferences.h"
#include "PropertyPage.h"
@@ -242,6 +242,13 @@ void DlgPreferencesImp::applyChanges()
page->saveSettings();
}
}
+
+ bool saveParameter = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/General")->
+ GetBool("SaveUserParameter", true);
+ if (saveParameter) {
+ ParameterManager* parmgr = App::GetApplication().GetParameterSet("User parameter");
+ parmgr->SaveDocument(App::Application::Config()["UserParameter"].c_str());
+ }
}
void DlgPreferencesImp::showEvent(QShowEvent* ev)