[gimp] app: gimp_item_replace_item(): if the item has an ID, remove it from the item hash
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: gimp_item_replace_item(): if the item has an ID, remove it from the item hash
- Date: Mon, 31 Jan 2011 22:54:55 +0000 (UTC)
commit 12e531f512b03bc401930fe3af9158fc571d7e2c
Author: Michael Natterer <mitch gimp org>
Date: Mon Jan 31 23:53:59 2011 +0100
app: gimp_item_replace_item(): if the item has an ID, remove it from the item hash
app/core/gimpitem.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpitem.c b/app/core/gimpitem.c
index 620c29d..a927933 100644
--- a/app/core/gimpitem.c
+++ b/app/core/gimpitem.c
@@ -1674,6 +1674,10 @@ gimp_item_replace_item (GimpItem *item,
gimp_object_set_name (GIMP_OBJECT (item), gimp_object_get_name (replace));
+ if (private->ID)
+ g_hash_table_remove (gimp_item_get_image (item)->gimp->item_table,
+ GINT_TO_POINTER (gimp_item_get_ID (item)));
+
private->ID = gimp_item_get_ID (replace);
g_hash_table_replace (gimp_item_get_image (item)->gimp->item_table,
GINT_TO_POINTER (gimp_item_get_ID (item)),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]