aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquicksmoothedanimation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/util/qquicksmoothedanimation.cpp')
-rw-r--r--src/quick/util/qquicksmoothedanimation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/util/qquicksmoothedanimation.cpp b/src/quick/util/qquicksmoothedanimation.cpp
index 021ff75f03..9dd9aa2e6d 100644
--- a/src/quick/util/qquicksmoothedanimation.cpp
+++ b/src/quick/util/qquicksmoothedanimation.cpp
@@ -153,10 +153,10 @@ bool QSmoothedAnimation::recalc()
s = (invert? -1.0: 1.0) * s;
- if (userDuration > 0 && velocity > 0) {
+ if (userDuration >= 0 && velocity > 0) {
tf = s / velocity;
if (tf > (userDuration / 1000.)) tf = (userDuration / 1000.);
- } else if (userDuration > 0) {
+ } else if (userDuration >= 0) {
tf = userDuration / 1000.;
} else if (velocity > 0) {
tf = s / velocity;