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.
This commit is contained in:
parent
35c35de55c
commit
bfc1583d76
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user