[gimp] gimp_item_real_duplicate(): don't set lock-content if it can't be set
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] gimp_item_real_duplicate(): don't set lock-content if it can't be set
- Date: Tue, 8 Sep 2009 20:11:25 +0000 (UTC)
commit 45f05b272c812a940cd844671d5b50d9116a0552
Author: Michael Natterer <mitch gimp org>
Date: Tue Sep 8 22:09:53 2009 +0200
gimp_item_real_duplicate(): don't set lock-content if it can't be set
Also use the proper APIs to set visible, linked and lock-content
instead of accessing the item struct directly.
app/core/gimpitem.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpitem.c b/app/core/gimpitem.c
index d8d4bb1..ca7cfb2 100644
--- a/app/core/gimpitem.c
+++ b/app/core/gimpitem.c
@@ -448,9 +448,12 @@ gimp_item_real_duplicate (GimpItem *item,
g_object_unref (new_item->parasites);
new_item->parasites = gimp_parasite_list_copy (item->parasites);
- new_item->visible = gimp_item_get_visible (item);
- new_item->linked = gimp_item_get_linked (item);
- new_item->lock_content = gimp_item_get_lock_content (item);
+ gimp_item_set_visible (new_item, gimp_item_get_visible (item), FALSE);
+ gimp_item_set_linked (new_item, gimp_item_get_linked (item), FALSE);
+
+ if (gimp_item_can_lock_content (new_item))
+ gimp_item_set_lock_content (new_item, gimp_item_get_lock_content (item),
+ FALSE);
return new_item;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]