[clutter] Revert "actor: Unconditionally set show_on_set_parent"



commit a2f54c59f5de9d9a577e1de44c2002c160ecc13b
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Thu Apr 26 14:02:07 2012 +0100

    Revert "actor: Unconditionally set show_on_set_parent"
    
    This reverts commit 81b19a78f5e02ae8ffd9235054d80b172496415b.
    
    The commit breaks the conformance test unit for the invariants we
    guarantee for the 1.x API:
    
    ERROR:actor-invariants.c:307:actor_show_on_set_parent: assertion failed: (show_on_set_parent)

 clutter/clutter-actor.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index a05d46b..988d462 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -1554,9 +1554,12 @@ set_show_on_set_parent (ClutterActor *self,
   if (priv->show_on_set_parent == set_show)
     return;
 
-  priv->show_on_set_parent = set_show;
-  g_object_notify_by_pspec (G_OBJECT (self),
-                            obj_props[PROP_SHOW_ON_SET_PARENT]);
+  if (priv->parent == NULL)
+    {
+      priv->show_on_set_parent = set_show;
+      g_object_notify_by_pspec (G_OBJECT (self),
+                                obj_props[PROP_SHOW_ON_SET_PARENT]);
+    }
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]