From 452cb1abbfed4adb7e3d802765df9e27775adc4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Wed, 5 May 2010 18:15:12 +0100 Subject: [PATCH] animator: fix looping when doing cubic interpolation When using interpolation and the last key is not at 1.0 a bouncing artifact could be observed after the keys. --- clutter/clutter-animator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clutter/clutter-animator.c b/clutter/clutter-animator.c index 4a596ad60..973e1e25e 100644 --- a/clutter/clutter-animator.c +++ b/clutter/clutter-animator.c @@ -515,7 +515,7 @@ animation_animator_ensure_animator (ClutterAnimator *animator, { next_key = initial_key; - property_iter->end = 1.0; + property_iter->end = property_iter->start; } clutter_interval_set_final_value (property_iter->interval, @@ -923,7 +923,7 @@ clutter_animator_compute_value (ClutterAnimator *animator, g_value_copy (&previous->value, value); return TRUE; } - if (next->progress >= progress) + if (next && next->progress >= progress) { ClutterInterval *interval; ClutterAlpha *alpha;