core: Refresh new vector layers when pasting it

When copying and pasting vector layers, if we needed
to add a new path then the layer was not redrawn.
This would require the user to move or edit the path
to see the correct view of it.

This patch adds a call to gimp_vector_layer_refresh ()
after pasting it if it is not rasterized, in order to correct
the initial view.
This commit is contained in:
Alx Sa 2026-02-19 23:18:39 +00:00
parent 6ab235dc20
commit 4bfa65d72d

View file

@ -5503,7 +5503,12 @@ gimp_image_add_layer (GimpImage *image,
if (path &&
(! gimp_item_is_attached (GIMP_ITEM (path))) &&
gimp_item_get_image (GIMP_ITEM (path)) == image)
gimp_image_add_path (image, path, NULL, -1, FALSE);
{
gimp_image_add_path (image, path, NULL, -1, FALSE);
}
if (! gimp_item_is_rasterized (GIMP_ITEM (layer)))
gimp_vector_layer_refresh (GIMP_VECTOR_LAYER (layer));
}
if (old_has_alpha != gimp_image_has_alpha (image))