From cbf01998040d6213ea79fe5320ee90612200596d Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 12 Jun 2013 09:51:10 +0100 Subject: [PATCH] actor: Fix has_constraints() and has_actions() When we changed the MetaGroup to handle internal effects, we updated has_effects(), but forgot to fix the equivalent has_constrains() and has_actions() method. Now, if we clear the constraints or the actions on an actor, and we call has_constraints() or has_actions(), we get an false positive. --- clutter/clutter-actor.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index cee624a36..5d7130e2f 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -17295,7 +17295,10 @@ clutter_actor_has_constraints (ClutterActor *self) { g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE); - return self->priv->constraints != NULL; + if (self->priv->constraints == NULL) + return FALSE; + + return _clutter_meta_group_has_metas_no_internal (self->priv->constraints); } /** @@ -17314,7 +17317,10 @@ clutter_actor_has_actions (ClutterActor *self) { g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE); - return self->priv->actions != NULL; + if (self->priv->actions == NULL) + return FALSE; + + return _clutter_meta_group_has_metas_no_internal (self->priv->actions); } /**