From 4fd946fa3e5217b8f64e0fcd91d268c7eaf1bbf5 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 10 Jun 2011 23:44:13 +0300 Subject: STORM-1305 WIP User sky presets now go first in all lists. --- indra/newview/llfloaterwindlight.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'indra/newview/llfloaterwindlight.cpp') 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::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::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); -- cgit v1.2.3