actor: Simplify setters of animatable properties
authorEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 28 Mar 2012 10:52:01 +0000 (11:52 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 28 Mar 2012 10:52:01 +0000 (11:52 +0100)
commitfa8d43194140bb40200365d3e63b2b9d0f47634c
tree77025b04723a46971032bc210e53c68631dec2cc
parent0f7dab15d85419d7ab968ae404140eef031755a9
actor: Simplify setters of animatable properties

Instead of checking the duration of the current easing state we should
check if there's a transition in progress, and update it
unconditionally.

If there is no easing state, or the easing state has a duration of zero
milliseconds, then create_transition() should bail out early and set the
requested final state.

This allows us to write:

  clutter_actor_save_easing_state (actor);
  clutter_actor_set_x (actor, 200);
  clutter_actor_restore_easing_state (actor);

  [...]

  clutter_actor_set_x (actor, 100);

and have the second set_x() update the easing in progress, instead of
being ignored.

https://bugzilla.gnome.org/show_bug.cgi?id=672945
clutter/clutter-actor.c