From 8a048593cafe714489cdd9d56964a941a3624b65 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 18 Jun 2021 18:16:30 +0200 Subject: Fix T89259: GPencil Duplicate point doesn't work for last point The loop was checking the len of the island, but if the island started in the last point the copy was not executed. --- source/blender/editors/gpencil/gpencil_edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 02b9fb6549b..21fa3ad3967 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -863,7 +863,7 @@ static void gpencil_duplicate_points(bGPdata *gpd, start_idx = i; } } - else { + if ((start_idx != -1) || (start_idx == gps->totpoints - 1)) { size_t len = 0; /* is this the end of current island yet? -- cgit v1.2.3