Fix #145100: Grease Pencil Pen tool subdividing multiple strokes

The pen tool would subdivide multiple strokes because the drawing index of the closest element wasn't compared to the currently processed drawings index.

Pull Request: https://projects.blender.org/blender/blender/pulls/145102
This commit is contained in:
Janne Nylander
2025-08-25 19:50:56 +02:00
committed by casey-bianco-davis
parent 8bb8bff4bf
commit 0d484f368e

View File

@@ -1170,7 +1170,7 @@ static wmOperatorStatus grease_pencil_pen_invoke(bContext *C, wmOperator *op, co
if (ptd.closest_element.element_mode == ElementMode::Edge) {
add_single.store(false, std::memory_order_relaxed);
if (ptd.insert_point) {
if (ptd.insert_point && ptd.closest_element.drawing_index == drawing_index) {
ptd.insert_point_to_curve(curves);
info.drawing.tag_topology_changed();
changed.store(true, std::memory_order_relaxed);