gimp_item_is_attached(): an item is attached if its parent item is attached

This commit is contained in:
Michael Natterer 2009-08-01 19:39:10 +02:00
parent f4f5fc5f55
commit fd8ebdacef
1 changed files with 7 additions and 0 deletions

View File

@ -637,8 +637,15 @@ gimp_item_configure (GimpItem *item,
gboolean
gimp_item_is_attached (GimpItem *item)
{
GimpViewable *parent;
g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
parent = gimp_viewable_get_parent (GIMP_VIEWABLE (item));
if (parent)
return gimp_item_is_attached (GIMP_ITEM (parent));
return GIMP_ITEM_GET_CLASS (item)->is_attached (item);
}