summaryrefslogtreecommitdiff
path: root/indra/newview/lldaycyclemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldaycyclemanager.cpp')
-rw-r--r--indra/newview/lldaycyclemanager.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/lldaycyclemanager.cpp b/indra/newview/lldaycyclemanager.cpp
index 07a9a72e68..ab442d7c83 100644
--- a/indra/newview/lldaycyclemanager.cpp
+++ b/indra/newview/lldaycyclemanager.cpp
@@ -109,6 +109,22 @@ bool LLDayCycleManager::deletePreset(const std::string& name)
return true;
}
+bool LLDayCycleManager::isSkyPresetReferenced(const std::string& preset_name) const
+{
+ // We're traversing local day cycles, they can only reference local skies.
+ LLWLParamKey key(preset_name, LLEnvKey::SCOPE_LOCAL);
+
+ for (dc_map_t::const_iterator it = mDayCycleMap.begin(); it != mDayCycleMap.end(); ++it)
+ {
+ if (it->second.hasReferencesTo(key))
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
+
boost::signals2::connection LLDayCycleManager::setModifyCallback(const modify_signal_t::slot_type& cb)
{
return mModifySignal.connect(cb);