[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.
This commit is contained in:
Emmanuele Bassi 2009-08-04 11:11:59 +01:00
parent f8a964b422
commit 9cda8d130f

View File

@ -789,8 +789,14 @@ clutter_actor_update_map_state (ClutterActor *self,
if (change == MAP_STATE_MAKE_MAPPED && !should_be_mapped) if (change == MAP_STATE_MAKE_MAPPED && !should_be_mapped)
{ {
if (parent == NULL)
g_warning ("Attempting to map a child that does not " g_warning ("Attempting to map a child that does not "
"meet the necessary invariants"); "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. /* If in reparent, we temporarily suspend unmap and unrealize.