From fdcf1b8783eb19ca2c96267c46e456be8e84fdb8 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 27 Mar 2019 17:06:45 +0200 Subject: SL-10818 FIXED [EEP] Wrong selection when keyframes are close together --- indra/llinventory/llsettingsdaycycle.cpp | 8 ++++++-- 1 file 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(mDayTracks[track]), startframe); + LLSettingsDay::CycleTrack_t collection = const_cast(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()); -- cgit v1.2.3