summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llinventory/llsettingsdaycycle.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp
index feb734f64e..403d0ff9d8 100644
--- a/indra/llinventory/llsettingsdaycycle.cpp
+++ b/indra/llinventory/llsettingsdaycycle.cpp
@@ -859,11 +859,15 @@ LLSettingsDay::CycleTrack_t::value_type LLSettingsDay::getSettingsNearKeyframe(c
if (startframe < 0.0f)
startframe = 1.0f + startframe;
- CycleTrack_t::iterator it = get_wrapping_atafter(const_cast<CycleTrack_t &>(mDayTracks[track]), startframe);
+ LLSettingsDay::CycleTrack_t collection = const_cast<CycleTrack_t &>(mDayTracks[track]);
+ CycleTrack_t::iterator it = get_wrapping_atafter(collection, startframe);
F32 dist = get_wrapping_distance(startframe, (*it).first);
- if (dist <= (fudge * 2.0f))
+ CycleTrack_t::iterator next_it = std::next(it);
+ if ((dist <= DEFAULT_MULTISLIDER_INCREMENT) && next_it != collection.end())
+ return (*next_it);
+ else if (dist <= (fudge * 2.0f))
return (*it);
return CycleTrack_t::value_type(TrackPosition(INVALID_TRACKPOS), LLSettingsBase::ptr_t());