summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-03-27 17:17:12 +0000
committerRider Linden <rider@lindenlab.com>2019-03-27 17:17:12 +0000
commit2bbb6c7e027ae12d18bef5db2cdc3e7ba41e8630 (patch)
tree16e006ce6dd9ca1364e11486e0970af3c98923c2 /indra
parent09981714c306b9bf89a8e65c49318ccc6c30580f (diff)
parentfdcf1b8783eb19ca2c96267c46e456be8e84fdb8 (diff)
Merged in maxim_productengine/viewer-eep (pull request #312)
SL-10818 FIXED [EEP] Wrong selection when keyframes are close together Approved-by: Andrey Kleshchev <andreykproductengine@lindenlab.com>
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());