Fix box selection erroneously including zero-length handles; fix GRS failing on sharp points (#2550)

* Fixed box selection selecting zero length handles

* Fix GRS for sharp points

* Apply suggestions from code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Adesh Gupta
2025-04-13 01:21:36 +00:00
committed by GitHub
co-authored by Keavon Chambers
parent e759e62291
commit 550ffc3f7f
2 changed files with 14 additions and 4 deletions
@@ -403,9 +403,12 @@ impl MessageHandler<TransformLayerMessage, TransformData<'_>> for TransformLayer
let handle1_length = handle1.length(&vector_data);
let handle2_length = handle2.length(&vector_data);
if (handle1_length == 0. && handle2_length == 0.) || (handle1_length == f64::MAX && handle2_length == f64::MAX) {
selected.original_transforms.clear();
return;
if (handle1_length == 0. && handle2_length == 0. && !using_select_tool) || (handle1_length == f64::MAX && handle2_length == f64::MAX && !using_select_tool) {
// G should work for this point but not R and S
if matches!(transform_type, TransformType::Rotate | TransformType::Scale) {
selected.original_transforms.clear();
return;
}
}
}
} else {