effects: Fix interpolated values for redirected animations
If a redirected animation reaches the end, the timeline value will be 0, i.e. the interpolated() function has to return the from value, not `to`. BUG: 438368
This commit is contained in:
parent
2ab70d0674
commit
61159d943c
1 changed files with 1 additions and 5 deletions
|
@ -682,11 +682,7 @@ void AnimationEffect::postPaintScreen()
|
|||
|
||||
float AnimationEffect::interpolated( const AniData &a, int i ) const
|
||||
{
|
||||
if (a.startTime > clock())
|
||||
return a.from[i];
|
||||
if (!a.timeLine.done())
|
||||
return a.from[i] + a.timeLine.value() * (a.to[i] - a.from[i]);
|
||||
return a.to[i]; // we're done and "waiting" at the target value
|
||||
}
|
||||
|
||||
float AnimationEffect::progress( const AniData &a ) const
|
||||
|
|
Loading…
Reference in a new issue