app: Fix duplicating vector layers
This commit is contained in:
parent
d1662f8f2c
commit
8bdb5cbfd7
2 changed files with 8 additions and 3 deletions
|
|
@ -336,6 +336,11 @@ gimp_image_duplicate_paths (GimpImage *image,
|
|||
GimpPath *path = list->data;
|
||||
GimpPath *new_path;
|
||||
|
||||
/* If the path is attached to a vector layer, it will be
|
||||
* duplicated already */
|
||||
if (gimp_path_attached_to_vector_layer (path, image))
|
||||
continue;
|
||||
|
||||
new_path = GIMP_PATH (gimp_image_duplicate_item (GIMP_ITEM (path),
|
||||
new_image));
|
||||
|
||||
|
|
|
|||
|
|
@ -398,10 +398,10 @@ gimp_vector_layer_convert (GimpItem *item,
|
|||
|
||||
if (path)
|
||||
{
|
||||
gimp_item_convert (GIMP_ITEM (path), dest_image, GIMP_TYPE_PATH);
|
||||
GIMP_ITEM_GET_CLASS (path)->convert (GIMP_ITEM (path), dest_image,
|
||||
G_TYPE_FROM_INSTANCE (path));
|
||||
|
||||
if (! gimp_item_is_attached (GIMP_ITEM (path)) &&
|
||||
gimp_item_get_image (GIMP_ITEM (path)) == dest_image)
|
||||
if (! gimp_item_is_attached (GIMP_ITEM (path)))
|
||||
gimp_image_add_path (dest_image, path, NULL, -1, FALSE);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue