Fix 'duplicate setting' errors when running installation wizard

pull/827/head
scrawl 9 years ago
parent 89783e047b
commit ace4cfc0a8

@ -384,6 +384,9 @@ bool Launcher::MainDialog::setupGraphicsSettings()
// remain consistent, and possibly be merged into a shared component. At the very least
// the filenames should be in the CfgMgr component.
// Ensure to clear previous settings in case we had already loaded settings.
mEngineSettings.clear();
// Create the settings manager and load default settings file
const std::string localDefault = (mCfgMgr.getLocalPath() / "settings-default.cfg").string();
const std::string globalDefault = (mCfgMgr.getGlobalPath() / "settings-default.cfg").string();

@ -353,6 +353,13 @@ private:
int mLine;
};
void Manager::clear()
{
mDefaultSettings.clear();
mUserSettings.clear();
mChangedSettings.clear();
}
void Manager::loadDefault(const std::string &file)
{
SettingsFileParser parser;

@ -23,6 +23,9 @@ namespace Settings
static CategorySettingVector mChangedSettings;
///< tracks all the settings that were changed since the last apply() call
void clear();
///< clears all settings and default settings
void loadDefault (const std::string& file);
///< load file as the default settings (can be overridden by user settings)

Loading…
Cancel
Save