diff options
Diffstat (limited to 'src/quick/util/qquicksmoothedanimation.cpp')
-rw-r--r-- | src/quick/util/qquicksmoothedanimation.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quick/util/qquicksmoothedanimation.cpp b/src/quick/util/qquicksmoothedanimation.cpp index 53e3520bde..9e9e6cb419 100644 --- a/src/quick/util/qquicksmoothedanimation.cpp +++ b/src/quick/util/qquicksmoothedanimation.cpp @@ -242,6 +242,9 @@ qreal QSmoothedAnimation::easeFollow(qreal time_seconds) void QSmoothedAnimation::updateCurrentTime(int t) { + if (!isRunning() && !isPaused()) // This can happen if init() stops the animation in some cases + return; + qreal time_seconds = useDelta ? qreal(QQmlAnimationTimer::instance()->currentDelta()) / 1000. : qreal(t - lastTime) / 1000.; if (useDelta) useDelta = false; @@ -351,7 +354,7 @@ void QSmoothedAnimation::init() sources. The \l {Animation and Transitions in Qt Quick} documentation shows a variety of methods for creating animations. - \sa SpringAnimation, NumberAnimation, {Animation and Transitions in Qt Quick}, {declarative/animation/basics}{Animation basics example} + \sa SpringAnimation, NumberAnimation, {Animation and Transitions in Qt Quick}, {Qt Quick Examples - Animation} */ QQuickSmoothedAnimation::QQuickSmoothedAnimation(QObject *parent) |