From db2c32285b95d3517ebcd1dbf84faa2872ab6428 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 25 Feb 2020 18:59:43 +0200 Subject: SL-12591 Fixed slider value comparison --- indra/newview/llfloatereditextdaycycle.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 2c10835fb0..f57a54163d 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -991,13 +991,20 @@ void LLFloaterEditExtDayCycle::onFrameSliderCallback(const LLSD &data) } else { - if (mEditDay->moveTrackKeyframe(mCurrentTrack, (*it).second.mFrame, sliderpos) && mCanMod) + // slider rounds values to nearest increments, changes can be substanntial (half increment) + if (abs(mFramesSlider->getNearestIncrement((*it).second.mFrame) - sliderpos) < F_APPROXIMATELY_ZERO) + { + // same value + mFramesSlider->setCurSliderValue((*it).second.mFrame); + } + else if (mEditDay->moveTrackKeyframe(mCurrentTrack, (*it).second.mFrame, sliderpos) && mCanMod) { (*it).second.mFrame = sliderpos; setDirtyFlag(); } else { + // same value, wrong track, no such value, no mod mFramesSlider->setCurSliderValue((*it).second.mFrame); } -- cgit v1.2.3