From 62607ec39071cbe6c8e03eb336ce0497b5853bd0 Mon Sep 17 00:00:00 2001 From: Jamie Newbon Date: Mon, 27 Apr 2020 16:58:27 +0100 Subject: [PATCH] #6538 Added check if system config doesnt exist then copy from user settings --- src/gui/src/AppConfig.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/src/AppConfig.cpp b/src/gui/src/AppConfig.cpp index 5259a19ab..990405078 100644 --- a/src/gui/src/AppConfig.cpp +++ b/src/gui/src/AppConfig.cpp @@ -446,8 +446,12 @@ void AppConfig::setLoadFromSystemScope(bool value) { m_LoadFromSystemScope = value; m_unsavedChanges = true; writer->globalSave(); //Save user prefs - writer->setScope(ConfigWriter::kSystem); //Switch the the System Scope and reload - writer->globalLoad(); + writer->setScope(ConfigWriter::kSystem); //Switch the the System Scope + //If the system scope has settings, trigger a global reload, otherwise keep the current users settings + if (writer->hasSetting(settingName(kScreenName), ConfigWriter::kUser)) { + // If the system already has settings, then load them up now. + writer->globalLoad(); + } } else if (!value && writer->getScope() == ConfigWriter::kSystem) {