[gimp] gimp_item_is_attached(): an item is attached if its parent item is attached
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] gimp_item_is_attached(): an item is attached if its parent item is attached
- Date: Sat, 1 Aug 2009 17:40:09 +0000 (UTC)
commit fd8ebdacef6afd6671a61d50d6cfecee30544b4a
Author: Michael Natterer <mitch gimp org>
Date: Sat Aug 1 19:39:10 2009 +0200
gimp_item_is_attached(): an item is attached if its parent item is attached
app/core/gimpitem.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpitem.c b/app/core/gimpitem.c
index e2b0227..425ff5f 100644
--- a/app/core/gimpitem.c
+++ b/app/core/gimpitem.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]