Skip to content
Snippets Groups Projects
Commit fdcf1b87 authored by maxim_productengine's avatar maxim_productengine
Browse files

SL-10818 FIXED [EEP] Wrong selection when keyframes are close together

parent 9dee4149
No related branches found
No related tags found
No related merge requests found
...@@ -859,11 +859,15 @@ LLSettingsDay::CycleTrack_t::value_type LLSettingsDay::getSettingsNearKeyframe(c ...@@ -859,11 +859,15 @@ LLSettingsDay::CycleTrack_t::value_type LLSettingsDay::getSettingsNearKeyframe(c
if (startframe < 0.0f) if (startframe < 0.0f)
startframe = 1.0f + startframe; 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); 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 (*it);
return CycleTrack_t::value_type(TrackPosition(INVALID_TRACKPOS), LLSettingsBase::ptr_t()); return CycleTrack_t::value_type(TrackPosition(INVALID_TRACKPOS), LLSettingsBase::ptr_t());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment