From ab431d1774d5b282836a3327dd0bfa8b3b91632b Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 14 Jun 2011 18:04:29 +0300 Subject: STORM-1305 WIP User day cycles now go first in all lists. --- indra/newview/llfloatereditdaycycle.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloatereditdaycycle.cpp') 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")); -- cgit v1.2.3