summaryrefslogtreecommitdiff
path: root/indra/newview/llpresetsmanager.cpp
diff options
context:
space:
mode:
authorJonathan Yap <jhwelch@gmail.com>2015-01-07 19:14:46 -0500
committerJonathan Yap <jhwelch@gmail.com>2015-01-07 19:14:46 -0500
commitf6a1980c256474b96d5fe7943bfe1bd582826860 (patch)
tree84196fa5e21a88e6be41ee2a96778910fcdffcf0 /indra/newview/llpresetsmanager.cpp
parent32ced419feb71d62f290872f98fc3d2bb4300c59 (diff)
STORM-2082 Display active preset as first choice in dropdown box
Diffstat (limited to 'indra/newview/llpresetsmanager.cpp')
-rw-r--r--indra/newview/llpresetsmanager.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index 05a135b19c..36a82db916 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -206,12 +206,21 @@ void LLPresetsManager::setPresetNamesInComboBox(const std::string& subdirectory,
std::list<std::string> preset_names;
loadPresetNamesFromDir(presets_dir, preset_names, default_option);
+ std::string preset_graphic_active = gSavedSettings.getString("PresetGraphicActive");
+
if (preset_names.begin() != preset_names.end())
{
for (std::list<std::string>::const_iterator it = preset_names.begin(); it != preset_names.end(); ++it)
{
const std::string& name = *it;
- combo->add(name, LLSD().with(0, name));
+ if (name != preset_graphic_active)
+ {
+ combo->add(name, LLSD().with(0, name));
+ }
+ else
+ {
+ combo->add(name, LLSD().with(0, name), ADD_TOP);
+ }
}
}
else