summaryrefslogtreecommitdiff
path: root/indra/newview/lldaycyclemanager.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/lldaycyclemanager.cpp
parent4fd946fa3e5217b8f64e0fcd91d268c7eaf1bbf5 (diff)
STORM-1305 WIP User day cycles now go first in all lists.
Diffstat (limited to 'indra/newview/lldaycyclemanager.cpp')
-rw-r--r--indra/newview/lldaycyclemanager.cpp36
1 files changed, 32 insertions, 4 deletions
diff --git a/indra/newview/lldaycyclemanager.cpp b/indra/newview/lldaycyclemanager.cpp
index ab442d7c83..347a467a8b 100644
--- a/indra/newview/lldaycyclemanager.cpp
+++ b/indra/newview/lldaycyclemanager.cpp
@@ -30,12 +30,40 @@
#include "lldiriterator.h"
-const LLDayCycleManager::dc_map_t& LLDayCycleManager::getPresets()
+void LLDayCycleManager::getPresetNames(preset_name_list_t& names) const
{
- // Refresh day cycles.
- loadAllPresets();
+ names.clear();
+
+ for (dc_map_t::const_iterator it = mDayCycleMap.begin(); it != mDayCycleMap.end(); ++it)
+ {
+ names.push_back(it->first);
+ }
+}
+
+void LLDayCycleManager::getPresetNames(preset_name_list_t& user, preset_name_list_t& sys) const
+{
+ user.clear();
+ sys.clear();
- return mDayCycleMap;
+ for (dc_map_t::const_iterator it = mDayCycleMap.begin(); it != mDayCycleMap.end(); ++it)
+ {
+ const std::string& name = it->first;
+
+ if (isSystemPreset(name))
+ {
+ sys.push_back(name);
+ }
+ else
+ {
+ user.push_back(name);
+ }
+ }
+}
+
+void LLDayCycleManager::getUserPresetNames(preset_name_list_t& user) const
+{
+ preset_name_list_t sys; // unused
+ getPresetNames(user, sys);
}
bool LLDayCycleManager::getPreset(const std::string name, LLWLDayCycle& day_cycle) const