From 00629571f2ff6551c2966a80c9ecbb1a246a0448 Mon Sep 17 00:00:00 2001 From: 0SlowPoke0 <142654792+0SlowPoke0@users.noreply.github.com> Date: Sat, 30 Nov 2024 04:28:28 +0530 Subject: [PATCH] Disabling colinear state when both the handles are selected and moved (#2120) * disable collinear state * Add comment --------- Co-authored-by: hypercube <0hypercube@gmail.com> --- editor/src/messages/tool/common_functionality/shape_editor.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/src/messages/tool/common_functionality/shape_editor.rs b/editor/src/messages/tool/common_functionality/shape_editor.rs index 446c48e3e..03c3ef02e 100644 --- a/editor/src/messages/tool/common_functionality/shape_editor.rs +++ b/editor/src/messages/tool/common_functionality/shape_editor.rs @@ -662,6 +662,10 @@ impl ShapeState { let Some(other) = vector_data.other_colinear_handle(handle) else { continue }; if state.is_selected(other.to_manipulator_point()) { + // If two colinear handles are being dragged at the same time but not the anchor, it is necessary to break the colinear state. + let handles = [handle, other]; + let modification_type = VectorModificationType::SetG1Continuous { handles, enabled: false }; + responses.add(GraphOperationMessage::Vector { layer, modification_type }); continue; }