Commit bfc1583d authored by Chris Lord's avatar Chris Lord

state: Fix warping to the current state during transitions

If you warp to a state, it should be immediately set. Check if the
animation is in progress when warping to a state and don't short-circuit
in the already-set check if we're not animating.
parent 35c35de5
......@@ -507,8 +507,12 @@ clutter_state_change (ClutterState *state,
if (target_state_name == priv->target_state_name)
{
/* Avoid transitioning if the desired state is already current */
return priv->timeline;
/* Avoid transitioning if the desired state is already current,
* unless we're warping to it and the state transition is in
* progress (in that case, immediately warp to the state).
*/
if (!clutter_timeline_is_playing (priv->timeline) || animate)
return priv->timeline;
}
if (priv->current_animator != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment