diff --git a/src/gui/src/AppConfig.cpp b/src/gui/src/AppConfig.cpp index 66d4d294b..f663ce8f2 100644 --- a/src/gui/src/AppConfig.cpp +++ b/src/gui/src/AppConfig.cpp @@ -577,10 +577,11 @@ QVariant AppConfig::loadCommonSetting(AppConfig::Setting name, const QVariant& d return result; } -void AppConfig::loadScope(ConfigWriter::Scope scope) const { +void AppConfig::loadScope(ConfigWriter::Scope scope) { auto writer = ConfigWriter::make(); if (writer->getScope() != scope) { + setDefaultValues(); writer->setScope(scope); if (writer->hasSetting(settingName(kScreenName), writer->getScope())) { //If the user already has settings, then load them up now. @@ -589,6 +590,11 @@ void AppConfig::loadScope(ConfigWriter::Scope scope) const { } } +void AppConfig::setDefaultValues() +{ + m_InitiateConnectionFromServer = false; +} + void AppConfig::setLoadFromSystemScope(bool value) { if (value) { diff --git a/src/gui/src/AppConfig.h b/src/gui/src/AppConfig.h index 5e0c56dc0..e61c9c106 100644 --- a/src/gui/src/AppConfig.h +++ b/src/gui/src/AppConfig.h @@ -344,7 +344,11 @@ protected: /// @brief This method loads config from specified scope /// @param [in] scope which should be loaded. - void loadScope(GUI::Config::ConfigWriter::Scope scope) const; + void loadScope(GUI::Config::ConfigWriter::Scope scope); + + /// @brief This function sets default values + /// for settings that shouldn't be copied from between scopes. + void setDefaultValues(); signals: void sslToggled() const;