actor: Queue a relayout when adding/removing constraints
authorEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 12 Oct 2010 13:07:27 +0000 (14:07 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 12 Oct 2010 13:07:27 +0000 (14:07 +0100)
Constraints change the way an actor is allocated; this warrants a
relayout.

clutter/clutter-actor.c

index a206458..fa76f2c 100644 (file)
@@ -11068,6 +11068,7 @@ clutter_actor_add_constraint (ClutterActor      *self,
 
   _clutter_meta_group_add_meta (priv->constraints,
                                 CLUTTER_ACTOR_META (constraint));
+  clutter_actor_queue_relayout (self);
 
   _clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_CONSTRAINTS]);
 }
@@ -11130,6 +11131,7 @@ clutter_actor_remove_constraint (ClutterActor      *self,
 
   _clutter_meta_group_remove_meta (priv->constraints,
                                    CLUTTER_ACTOR_META (constraint));
+  clutter_actor_queue_relayout (self);
 
   _clutter_notify_by_pspec (G_OBJECT (self), obj_props[PROP_CONSTRAINTS]);
 }
@@ -11164,6 +11166,7 @@ clutter_actor_remove_constraint_by_name (ClutterActor *self,
     return;
 
   _clutter_meta_group_remove_meta (priv->constraints, meta);
+  clutter_actor_queue_relayout (self);
 }
 
 /**