Fix setting the mode on a ClutterAlpha created with animation_set_alpha(NULL)
It previously attempted to set the mode on the alpha using clutter_animation_set_mode_internal, but this was setting the mode on priv->alpha. At that point in the code priv->alpha is always NULL. clutter_animation_set_mode_internal now takes a parameter to specify which alpha to modify.
This commit is contained in:
parent
2ed60a5270
commit
62cfc6487f
@ -780,12 +780,11 @@ clutter_animation_get_actor (ClutterAnimation *animation)
|
||||
}
|
||||
|
||||
static inline void
|
||||
clutter_animation_set_mode_internal (ClutterAnimation *animation)
|
||||
clutter_animation_set_mode_internal (ClutterAnimation *animation,
|
||||
ClutterAlpha *alpha)
|
||||
{
|
||||
ClutterAnimationPrivate *priv = animation->priv;
|
||||
ClutterAlpha *alpha;
|
||||
|
||||
alpha = clutter_animation_get_alpha (animation);
|
||||
if (alpha)
|
||||
clutter_alpha_set_mode (alpha, priv->mode);
|
||||
}
|
||||
@ -810,7 +809,7 @@ clutter_animation_set_mode (ClutterAnimation *animation,
|
||||
priv = animation->priv;
|
||||
|
||||
priv->mode = mode;
|
||||
clutter_animation_set_mode_internal (animation);
|
||||
clutter_animation_set_mode_internal (animation, priv->alpha);
|
||||
|
||||
g_object_notify (G_OBJECT (animation), "mode");
|
||||
}
|
||||
@ -1066,7 +1065,7 @@ clutter_animation_set_alpha (ClutterAnimation *animation,
|
||||
|
||||
alpha = clutter_alpha_new ();
|
||||
clutter_alpha_set_timeline (alpha, timeline);
|
||||
clutter_animation_set_mode_internal (animation);
|
||||
clutter_animation_set_mode_internal (animation, alpha);
|
||||
}
|
||||
|
||||
priv->alpha = g_object_ref_sink (alpha);
|
||||
|
Loading…
Reference in New Issue
Block a user