Skip to content

Fix zero-duration value animations returning the previous value - #8469

Open
cuishuang wants to merge 1 commit into
emilk:mainfrom
cuishuang:fix-zero-duration-value-animation
Open

Fix zero-duration value animations returning the previous value#8469
cuishuang wants to merge 1 commit into
emilk:mainfrom
cuishuang:fix-zero-duration-value-animation

Conversation

@cuishuang

@cuishuang cuishuang commented Aug 28, 2026

Copy link
Copy Markdown

animate_value_with_time returned the previous value for one frame when called with a zero duration because it calculated the current value before updating the animation target.

Handle zero-duration animations before interpolation so they immediately return and store the target value. Add a regression test covering consecutive target changes.

Signed-off-by: cuishuang <imcusg@gmail.com>
@github-actions

Copy link
Copy Markdown

Preview is being built...

Preview will be available at https://egui-pr-preview.github.io/pr/8469-fix-zero-duration-value-animation

View snapshot changes at kitdiff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant