diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-06-07 17:41:26 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-06-07 17:41:26 +0300 |
commit | 7151a4e6b02f02155387fc595034a42aebd7ec9c (patch) | |
tree | 4e8727d56b795edc20d43a70f295ec47b3c937f5 /indra/newview/llwldaycycle.cpp | |
parent | 497c0983bb013cb65b6faf10045ea7b62511cc55 (diff) |
STORM-1255 WIP Consistency pass on sky presets removal.
* Update all related floaters when a sky preset gets removed.
* Don't allow removing skies referenced by (local) day cycles.
* Other minor fixes.
Diffstat (limited to 'indra/newview/llwldaycycle.cpp')
-rw-r--r-- | indra/newview/llwldaycycle.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp index 80001525f8..e646b605a9 100644 --- a/indra/newview/llwldaycycle.cpp +++ b/indra/newview/llwldaycycle.cpp @@ -270,10 +270,10 @@ bool LLWLDayCycle::removeKeyframe(F32 time) return false; } -bool LLWLDayCycle::getKeytime(LLWLParamKey frame, F32& key_time) +bool LLWLDayCycle::getKeytime(LLWLParamKey frame, F32& key_time) const { // scroll through till we find the correct value in the map - std::map<F32, LLWLParamKey>::iterator mIt = mTimeMap.begin(); + std::map<F32, LLWLParamKey>::const_iterator mIt = mTimeMap.begin(); for(; mIt != mTimeMap.end(); ++mIt) { if(frame == mIt->second) @@ -315,6 +315,12 @@ bool LLWLDayCycle::getKeyedParamName(F32 time, std::string & name) return false; } +bool LLWLDayCycle::hasReferencesTo(const LLWLParamKey& keyframe) const +{ + F32 dummy; + return getKeytime(keyframe, dummy); +} + void LLWLDayCycle::removeReferencesTo(const LLWLParamKey& keyframe) { lldebugs << "Removing references to key frame " << keyframe.toLLSD() << llendl; |