diff --git a/crates/ui-contract/src/runtime/motion.rs b/crates/ui-contract/src/runtime/motion.rs index f52cfa571..5fb7df0be 100644 --- a/crates/ui-contract/src/runtime/motion.rs +++ b/crates/ui-contract/src/runtime/motion.rs @@ -396,7 +396,8 @@ impl Driver<'_> { let now = frame::clock(ctx); let existing = if sizing { store::peek_clone::>(ctx, id) } else { store::take::>(ctx, id) }; // A tween that moves in this pass (a new target, also one it jumps to, or a step, also its last one) leaves the - // slot in another state than the run found it in, which the next run reads (`layer_fading` among others). + // slot in another state than the run found it in, which the next run reads (`layer_fading` among others): a + // record of the run is not replayed. Only a tween still running asks for another frame. let moved = existing.as_ref().is_some_and(|tween| tween.target() != target || !tween.is_settled()); let mut tween = match existing { Some(tween) => tween, @@ -410,8 +411,10 @@ impl Driver<'_> { self.advance(&mut tween, target, spec, now); let shown = tween.shown(); if !sizing { - if moved || !tween.is_settled() { + if !tween.is_settled() { note_unsettled(ctx); + } else if moved { + crate::runtime::replay::note_unsettled(ctx); } store::put(ctx, id, tween); }