summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterdeleteenvpreset.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-06-10 21:21:04 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-06-10 21:21:04 +0300
commit23d8fb9750afc158d97fdf51633ed59b1b36f223 (patch)
treee30354ea174daea3eed32339a1bae48a3d9a5610 /indra/newview/llfloaterdeleteenvpreset.cpp
parent150c18169de8b7155658e676b86014716f62aeed (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/llfloaterdeleteenvpreset.cpp')
-rw-r--r--indra/newview/llfloaterdeleteenvpreset.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/indra/newview/llfloaterdeleteenvpreset.cpp b/indra/newview/llfloaterdeleteenvpreset.cpp
index 56412acc07..0b4104affd 100644
--- a/indra/newview/llfloaterdeleteenvpreset.cpp
+++ b/indra/newview/llfloaterdeleteenvpreset.cpp
@@ -193,17 +193,11 @@ void LLFloaterDeleteEnvPreset::populateWaterPresetsList()
cur_preset = env_mgr.getWaterPresetName();
}
- LLWaterParamManager& water_mgr = LLWaterParamManager::instance();
- const LLWaterParamManager::preset_map_t &water_params_map = water_mgr.getPresets();
- for (LLWaterParamManager::preset_map_t::const_iterator it = water_params_map.begin(); it != water_params_map.end(); it++)
+ LLWaterParamManager::preset_name_list_t presets;
+ LLWaterParamManager::instance().getUserPresetNames(presets); // list only user presets
+ for (LLWaterParamManager::preset_name_list_t::const_iterator it = presets.begin(); it != presets.end(); ++it)
{
- std::string name = it->first;
-
- // list only user presets
- if (water_mgr.isSystemPreset(name))
- {
- continue;
- }
+ std::string name = *it;
bool enabled = (name != cur_preset); // don't allow deleting current preset
mPresetCombo->add(name, ADD_BOTTOM, enabled);