summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterdeleteenvpreset.cpp
diff options
context:
space:
mode:
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);