Disabling colinear state when both the handles are selected and moved (#2120)

* disable collinear state

* Add comment

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
This commit is contained in:
0SlowPoke0 2024-11-30 04:28:28 +05:30 committed by GitHub
parent 2cf33e45bd
commit 00629571f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}