Fix T100768: Reverse curves skips handles of middle Bezier points
Reversing Bezier handle types and positions would skip the middle point of curves with an odd number of segments, which is still necessary to swap in order to avoid changing the curve's shape.
This commit is contained in:
@@ -1345,6 +1345,10 @@ static void reverse_swap_curve_point_data(const CurvesGeometry &curves,
|
||||
std::swap(a[end_index], b[i]);
|
||||
std::swap(b[end_index], a[i]);
|
||||
}
|
||||
if (points.size() % 2) {
|
||||
const int64_t middle_index = points.size() / 2;
|
||||
std::swap(a[middle_index], b[middle_index]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user