summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterenvironmentsettings.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-06-10 23:44:13 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-06-10 23:44:13 +0300
commit4fd946fa3e5217b8f64e0fcd91d268c7eaf1bbf5 (patch)
treee5c810ecd44990bce20ff502bce4df08976b80f1 /indra/newview/llfloaterenvironmentsettings.cpp
parent23d8fb9750afc158d97fdf51633ed59b1b36f223 (diff)
STORM-1305 WIP User sky presets now go first in all lists.
Diffstat (limited to 'indra/newview/llfloaterenvironmentsettings.cpp')
-rw-r--r--indra/newview/llfloaterenvironmentsettings.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/indra/newview/llfloaterenvironmentsettings.cpp b/indra/newview/llfloaterenvironmentsettings.cpp
index 66ca3334dd..e8d123a955 100644
--- a/indra/newview/llfloaterenvironmentsettings.cpp
+++ b/indra/newview/llfloaterenvironmentsettings.cpp
@@ -234,11 +234,25 @@ void LLFloaterEnvironmentSettings::populateSkyPresetsList()
{
mSkyPresetCombo->removeall();
- const std::map<LLWLParamKey, LLWLParamSet> &sky_params_map = LLWLParamManager::getInstance()->mParamList;
- for (std::map<LLWLParamKey, LLWLParamSet>::const_iterator it = sky_params_map.begin(); it != sky_params_map.end(); it++)
+ LLWLParamManager::preset_name_list_t region_presets; // unused as we don't list region presets here
+ LLWLParamManager::preset_name_list_t user_presets, sys_presets;
+ LLWLParamManager::instance().getPresetNames(region_presets, user_presets, sys_presets);
+
+ // Add user presets.
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it)
+ {
+ mSkyPresetCombo->add(*it);
+ }
+
+ if (!user_presets.empty())
+ {
+ mSkyPresetCombo->addSeparator();
+ }
+
+ // Add system presets.
+ for (LLWLParamManager::preset_name_list_t::const_iterator it = sys_presets.begin(); it != sys_presets.end(); ++it)
{
- if (it->first.scope == LLEnvKey::SCOPE_REGION) continue; // list only local presets
- mSkyPresetCombo->add(it->first.name);
+ mSkyPresetCombo->add(*it);
}
}