summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterregioninfo.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-06-14 18:04:29 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-06-14 18:04:29 +0300
commitab431d1774d5b282836a3327dd0bfa8b3b91632b (patch)
tree22e89504eb196f0310b5473d299950c8ea8476f6 /indra/newview/llfloaterregioninfo.cpp
parent4fd946fa3e5217b8f64e0fcd91d268c7eaf1bbf5 (diff)
STORM-1305 WIP User day cycles now go first in all lists.
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rw-r--r--indra/newview/llfloaterregioninfo.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 3734e5e280..4535ad0240 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -3504,13 +3504,23 @@ void LLPanelEnvironmentInfo::populateDayCyclesList()
mDayCyclePresetCombo->addSeparator();
}
- // Add local day cycles.
- const LLDayCycleManager::dc_map_t& map = LLDayCycleManager::instance().getPresets();
- for (LLDayCycleManager::dc_map_t::const_iterator it = map.begin(); it != map.end(); ++it)
+ // Add local user day cycles.
+ LLDayCycleManager::preset_name_list_t user_days, sys_days;
+ LLDayCycleManager::instance().getPresetNames(user_days, sys_days);
+ for (LLDayCycleManager::preset_name_list_t::const_iterator it = user_days.begin(); it != user_days.end(); ++it)
{
- std::string name = it->first;
- LLWLParamKey key(name, LLEnvKey::SCOPE_LOCAL);
- mDayCyclePresetCombo->add(name, key.toStringVal());
+ mDayCyclePresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal());
+ }
+
+ if (user_days.size() > 0)
+ {
+ mDayCyclePresetCombo->addSeparator();
+ }
+
+ // Add local system day cycles.
+ for (LLDayCycleManager::preset_name_list_t::const_iterator it = sys_days.begin(); it != sys_days.end(); ++it)
+ {
+ mDayCyclePresetCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal());
}
// Current day cycle is already selected.