summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstyleanimation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles/qstyleanimation.cpp')
-rw-r--r--src/widgets/styles/qstyleanimation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qstyleanimation.cpp b/src/widgets/styles/qstyleanimation.cpp
index b9202eae69..f4a2ebe913 100644
--- a/src/widgets/styles/qstyleanimation.cpp
+++ b/src/widgets/styles/qstyleanimation.cpp
@@ -122,9 +122,9 @@ bool QStyleAnimation::isUpdateNeeded() const
return currentTime() > _delay;
}
-void QStyleAnimation::updateCurrentTime(int)
+void QStyleAnimation::updateCurrentTime(int time)
{
- if (++_skip >= _fps) {
+ if (++_skip >= _fps || time >= duration()) {
_skip = 0;
if (target() && isUpdateNeeded())
updateTarget();