Fix: Grease Pencil: Points copied from same stroke were not split

When copying (`Ctrl+C`) some ranges of points in the same stroke,
the points would still be copied as one stroke and not split into
multiple strokes.

This was a regression in behavior from 4.2.

Now we use the `remove_points_and_split` to split the selected
points into individual strokes.
This commit is contained in:
Falk David
2025-02-14 18:15:11 +01:00
parent bb715caf94
commit bd5023349a
@@ -2591,7 +2591,8 @@ static int grease_pencil_copy_strokes_exec(bContext *C, wmOperator *op)
}
else if (selection_domain == bke::AttrDomain::Point) {
const IndexMask selected_points = ed::curves::retrieve_selected_points(curves, memory);
copied_curves = curves_copy_point_selection(curves, selected_points, {});
copied_curves = remove_points_and_split(
curves, selected_points.complement(curves.points_range(), memory));
num_elements_copied += copied_curves.points_num();
}