From 9cda8d130f7097d8ca43ffb0e50206ab72d1892d Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 4 Aug 2009 11:11:59 +0100 Subject: [PATCH] [actor] Be more explicit when warning about invariants The "catch all" warning for a the mapped invariant violation is too generic: it doesn't tell you why the invariant was broken in case we are trying to map an unparented actor - e.g. through a Clone. --- 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 a10f90902..51ba977a7 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -789,8 +789,14 @@ clutter_actor_update_map_state (ClutterActor *self, if (change == MAP_STATE_MAKE_MAPPED && !should_be_mapped) { - g_warning ("Attempting to map a child that does not " - "meet the necessary invariants"); + if (parent == NULL) + g_warning ("Attempting to map a child that does not " + "meet the necessary invariants: the actor " + "has no parent"); + else + g_warning ("Attempting to map a child that does not " + "meet the necessary invariants: the actor " + "is parented to an unmapped actor"); } /* If in reparent, we temporarily suspend unmap and unrealize.