From 4bfa65d72d8d7dc728bdaba6894557af5a47e875 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Thu, 19 Feb 2026 23:18:39 +0000 Subject: [PATCH] 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. --- app/core/gimpimage.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c index 84bf84fa6d..cdf8a59fcb 100644 --- a/app/core/gimpimage.c +++ b/app/core/gimpimage.c @@ -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))