QStyleAnimation: make sure the last frame of animation is rendered
Amend to 8738f09b9fc1b35e3dc78211368d87069f3071f7. The last frame of animation might be lacked if [_skip < fps]. Fixes: QTBUG-89118 Pick-to: 6.0 5.15 Change-Id: Ia0345e2aff7579afe2d60c4e7495bfaa1f36198c Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
parent
1c635e805f
commit
04fed9f77e
@ -122,9 +122,9 @@ bool QStyleAnimation::isUpdateNeeded() const
|
|||||||
return currentTime() > _delay;
|
return currentTime() > _delay;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QStyleAnimation::updateCurrentTime(int)
|
void QStyleAnimation::updateCurrentTime(int time)
|
||||||
{
|
{
|
||||||
if (++_skip >= _fps) {
|
if (++_skip >= _fps || time >= duration()) {
|
||||||
_skip = 0;
|
_skip = 0;
|
||||||
if (target() && isUpdateNeeded())
|
if (target() && isUpdateNeeded())
|
||||||
updateTarget();
|
updateTarget();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user