diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-06-10 21:21:04 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-06-10 21:21:04 +0300 |
commit | 23d8fb9750afc158d97fdf51633ed59b1b36f223 (patch) | |
tree | e30354ea174daea3eed32339a1bae48a3d9a5610 /indra/newview/llfloaterenvironmentsettings.cpp | |
parent | 150c18169de8b7155658e676b86014716f62aeed (diff) |
STORM-1305 WIP User water presets now go first in all lists.
Besides, removed all cases of direct access to the water presets map in preparation for future lazy loading.
Diffstat (limited to 'indra/newview/llfloaterenvironmentsettings.cpp')
-rw-r--r-- | indra/newview/llfloaterenvironmentsettings.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/indra/newview/llfloaterenvironmentsettings.cpp b/indra/newview/llfloaterenvironmentsettings.cpp index 8f451d7620..66ca3334dd 100644 --- a/indra/newview/llfloaterenvironmentsettings.cpp +++ b/indra/newview/llfloaterenvironmentsettings.cpp @@ -209,10 +209,24 @@ void LLFloaterEnvironmentSettings::populateWaterPresetsList() { mWaterPresetCombo->removeall(); - const LLWaterParamManager::preset_map_t &water_params_map = LLWaterParamManager::getInstance()->getPresets(); - for (LLWaterParamManager::preset_map_t::const_iterator it = water_params_map.begin(); it != water_params_map.end(); it++) + std::list<std::string> user_presets, system_presets; + LLWaterParamManager::instance().getPresetNames(user_presets, system_presets); + + // Add user presets first. + for (std::list<std::string>::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it) + { + mWaterPresetCombo->add(*it); + } + + if (user_presets.size() > 0) + { + mWaterPresetCombo->addSeparator(); + } + + // Add system presets. + for (std::list<std::string>::const_iterator it = system_presets.begin(); it != system_presets.end(); ++it) { - mWaterPresetCombo->add(it->first); + mWaterPresetCombo->add(*it); } } |