1
0
Fork 0

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>
This commit is contained in:
Emmanuele Bassi 2012-09-03 12:59:30 +01:00
parent 2ef148a2c9
commit 03f4f1c69e

View file

@ -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));