diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2019-04-04 18:09:23 +0300 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2019-04-04 18:09:23 +0300 |
commit | 64942c5cd1e497b19ef44bfb9799059d9d484634 (patch) | |
tree | e3c16b51f7f7a0a6f30f401efe726ed21d49889b | |
parent | 2151bc797e33a9a55e3d7008813110dc3391769a (diff) |
SL-10875 FIXED [EEP] Selecting the Day Cycle window causes the previous keyframe to become selected if keyframes are close together
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 4b88b4d7af..613ff30c32 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -1151,8 +1151,19 @@ void LLFloaterEditExtDayCycle::selectFrame(F32 frame, F32 slop_factor) while (iter != end_iter) { F32 keyframe = iter->second.mFrame; - if (fabs(keyframe - frame) <= slop_factor) + F32 frame_dif = fabs(keyframe - frame); + if (frame_dif <= slop_factor) { + keymap_t::iterator next_iter = std::next(iter); + if ((frame_dif != 0) && (next_iter != end_iter)) + { + if (fabs(next_iter->second.mFrame - frame) < frame_dif) + { + mFramesSlider->setCurSlider(next_iter->first); + frame = next_iter->second.mFrame; + break; + } + } mFramesSlider->setCurSlider(iter->first); frame = iter->second.mFrame; break; @@ -1301,7 +1312,6 @@ void LLFloaterEditExtDayCycle::updateSlider() { // update positions mLastFrameSlider = mFramesSlider->getCurSlider(); - updateTabs(); } else { |