summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-02-25 18:59:43 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-02-25 20:13:05 +0200
commitdb2c32285b95d3517ebcd1dbf84faa2872ab6428 (patch)
tree7d09897627402abd6c6ebe694941eaf8f81e598f /indra/newview
parentd16a79fc4c5d5af016db6c97efc3a7b2d08f62ce (diff)
SL-12591 Fixed slider value comparison
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp9
1 files changed, 8 insertions, 1 deletions
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);
}