GPv3: Avoid unnecessarily creating cyclic attribute in hard erasor

If the attribute didn't already exist (none of the initial curves
were cyclic), none of the result curves will be cylic either.
This commit is contained in:
Hans Goudey 2023-11-22 14:02:43 -05:00
parent f3ba4115f2
commit e28a782dbe
1 changed files with 4 additions and 2 deletions

View File

@ -538,8 +538,10 @@ struct EraseOperationExecutor {
{"cyclic"},
dst_to_src_curve,
dst_attributes);
array_utils::gather(
src_now_cyclic.as_span(), dst_to_src_curve.as_span(), dst.cyclic_for_write());
if (src_cyclic.get_if_single().value_or(true)) {
array_utils::gather(
src_now_cyclic.as_span(), dst_to_src_curve.as_span(), dst.cyclic_for_write());
}
/* Display intersections with flat caps. */
if (!keep_caps) {