summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterwindlight.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/llfloaterwindlight.cpp
parent23d8fb9750afc158d97fdf51633ed59b1b36f223 (diff)
STORM-1305 WIP User sky presets now go first in all lists.
Diffstat (limited to 'indra/newview/llfloaterwindlight.cpp')
-rw-r--r--indra/newview/llfloaterwindlight.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/indra/newview/llfloaterwindlight.cpp b/indra/newview/llfloaterwindlight.cpp
index f78fada155..43c61f2994 100644
--- a/indra/newview/llfloaterwindlight.cpp
+++ b/indra/newview/llfloaterwindlight.cpp
@@ -80,16 +80,17 @@ BOOL LLFloaterWindLight::postBuild()
if(comboBox != NULL) {
- std::map<LLWLParamKey, LLWLParamSet>::iterator mIt =
- LLWLParamManager::getInstance()->mParamList.begin();
- for(; mIt != LLWLParamManager::getInstance()->mParamList.end(); mIt++)
+ LLWLParamManager::preset_key_list_t preset_keys;
+ LLWLParamManager::instance().getPresetKeys(preset_keys);
+ for (LLWLParamManager::preset_key_list_t::const_iterator it = preset_keys.begin(); it != preset_keys.end(); ++it)
{
- const LLWLParamKey& key = mIt->first;
+ const LLWLParamKey& key = *it;
std::string item_title = key.name;
if (key.scope == LLEnvKey::SCOPE_REGION)
{
item_title += std::string(" (") + LLTrans::getString("Region") + std::string(")");
}
+
comboBox->add(item_title, key.toLLSD());
}
@@ -240,11 +241,8 @@ bool LLFloaterWindLight::newPromptCallback(const LLSD& notification, const LLSD&
// add the current parameters to the list
// see if it's there first
- std::map<LLWLParamKey, LLWLParamSet>::iterator mIt =
- LLWLParamManager::getInstance()->mParamList.find(newKey);
-
// if not there, add a new one
- if(mIt == LLWLParamManager::getInstance()->mParamList.end())
+ if (!LLWLParamManager::instance().hasParamSet(newKey))
{
LLWLParamManager::getInstance()->addParamSet(newKey,
LLWLParamManager::getInstance()->mCurParams);