diff options
author | Jonathan Yap <jhwelch@gmail.com> | 2014-12-03 06:35:46 -0500 |
---|---|---|
committer | Jonathan Yap <jhwelch@gmail.com> | 2014-12-03 06:35:46 -0500 |
commit | cc22efa4c0d6b06bac6f49b6243df7726f89c7c4 (patch) | |
tree | 4ab1120c671cfb5953ee7e4f362df2da0ea319d9 /indra/newview/llpresetsmanager.cpp | |
parent | ade3953e380d9211ad6d332b9b27fa23e57a7d81 (diff) |
STORM-2082 Remove Apply button.
Add new control variable to track which preset is active. Save settings
to active preset when clicking on Ok button.
Initial work to make pulldown operational. Still to do: add pretty icon for current preset.
Notifications do not appear when called from this panel.
Diffstat (limited to 'indra/newview/llpresetsmanager.cpp')
-rw-r--r-- | indra/newview/llpresetsmanager.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp index 709181b3ad..ddcd54162c 100644 --- a/indra/newview/llpresetsmanager.cpp +++ b/indra/newview/llpresetsmanager.cpp @@ -56,6 +56,11 @@ void LLPresetsManager::createMissingDefault() // when changing languages. savePreset(PRESETS_GRAPHIC, PRESETS_DEFAULT); } + + if (gSavedSettings.getString("PresetGraphicActive").empty()) + { + gSavedSettings.setString("PresetGraphicActive", PRESETS_DEFAULT); + } } std::string LLPresetsManager::getPresetsDir(const std::string& subdirectory) @@ -93,7 +98,7 @@ void LLPresetsManager::loadPresetNamesFromDir(const std::string& dir, preset_nam if (found) { std::string path = gDirUtilp->add(dir, file); - std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true)); + std::string name = gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true); if (PRESETS_DEFAULT != name) { mPresetNames.push_back(name); @@ -131,6 +136,8 @@ void LLPresetsManager::savePreset(const std::string& subdirectory, const std::st // Additions or subtractions to the control variables in the floaters must also be reflected here. if(PRESETS_GRAPHIC == subdirectory) { + gSavedSettings.setString("PresetGraphicActive", name); + name_list = boost::assign::list_of ("RenderQualityPerformance") ("RenderFarClip") @@ -164,7 +171,9 @@ void LLPresetsManager::savePreset(const std::string& subdirectory, const std::st ("RenderVBOEnable") ("RenderCompressTextures") ("TextureMemory") - ("RenderFogRatio"); + ("RenderFogRatio") + + ("PresetGraphicActive"); } if(PRESETS_CAMERA == subdirectory) |