diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-06-14 18:04:29 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-06-14 18:04:29 +0300 |
commit | ab431d1774d5b282836a3327dd0bfa8b3b91632b (patch) | |
tree | 22e89504eb196f0310b5473d299950c8ea8476f6 /indra/newview/llfloatereditdaycycle.cpp | |
parent | 4fd946fa3e5217b8f64e0fcd91d268c7eaf1bbf5 (diff) |
STORM-1305 WIP User day cycles now go first in all lists.
Diffstat (limited to 'indra/newview/llfloatereditdaycycle.cpp')
-rw-r--r-- | indra/newview/llfloatereditdaycycle.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llfloatereditdaycycle.cpp b/indra/newview/llfloatereditdaycycle.cpp index 4f4739384d..165b271133 100644 --- a/indra/newview/llfloatereditdaycycle.cpp +++ b/indra/newview/llfloatereditdaycycle.cpp @@ -287,11 +287,24 @@ void LLFloaterEditDayCycle::refreshDayCyclesList() } #endif - const LLDayCycleManager::dc_map_t& map = LLDayCycleManager::instance().getPresets(); - for (LLDayCycleManager::dc_map_t::const_iterator it = map.begin(); it != map.end(); ++it) + LLDayCycleManager::preset_name_list_t user_days, sys_days; + LLDayCycleManager::instance().getPresetNames(user_days, sys_days); + + // Add user days. + for (LLDayCycleManager::preset_name_list_t::const_iterator it = user_days.begin(); it != user_days.end(); ++it) { - LLWLParamKey key(it->first, LLEnvKey::SCOPE_LOCAL); - mDayCyclesCombo->add(key.name, key.toLLSD()); + mDayCyclesCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD()); + } + + if (user_days.size() > 0) + { + mDayCyclesCombo->addSeparator(); + } + + // Add system days. + for (LLDayCycleManager::preset_name_list_t::const_iterator it = sys_days.begin(); it != sys_days.end(); ++it) + { + mDayCyclesCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD()); } mDayCyclesCombo->setLabel(getString("combo_label")); |