diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2012-09-03 12:59:30 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2012-09-03 13:03:16 +0100 |
commit | 03f4f1c69e7c66702cbed7e158a36668ae3683b9 (patch) | |
tree | 5406b872d51f603bd4fd46b8aa3b28eb1f1dbc07 | |
parent | 2ef148a2c91bc5d09028549868e86d30ab267bac (diff) | |
download | clutter-03f4f1c69e7c66702cbed7e158a36668ae3683b9.tar.gz |
actor: Remove existing implicit transition if duration is 0
When changing an implicit transition mid flight we may end up with an
easing state with a duration of zero milliseconds; this leads to the
implicit transition machinery setting the final state directly onto the
actor. If there is a running transition, though, we need to remove it
from the transitions table, otherwise it will keep running.
This regression happened when the update_transition() internal function
was merged into the create_transition() one.
Tested-by: Lionel Landwerlin <llandwerlin@gmail.com>
-rw-r--r-- | clutter/clutter-actor.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 2c40736cf..e9ead060a 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -18624,6 +18624,9 @@ _clutter_actor_create_transition (ClutterActor *actor, */ if (info->cur_state->easing_duration == 0) { + /* remove a transition, if one exists */ + clutter_actor_remove_transition (actor, pspec->name); + clutter_actor_set_animatable_property (actor, pspec->param_id, &final, @@ -18784,6 +18787,8 @@ clutter_actor_remove_transition (ClutterActor *self, return; clos = g_hash_table_lookup (info->transitions, name); + if (clos == NULL) + return; was_playing = clutter_timeline_is_playing (CLUTTER_TIMELINE (clos->transition)); |