app: gimp_item_replace_item(): if the item has an ID, remove it from the item hash
This commit is contained in:
parent
e893e3130c
commit
12e531f512
1 changed files with 4 additions and 0 deletions
|
|
@ -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)),
|
||||
|
|
|
|||
Loading…
Reference in a new issue