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
@@ -1444,7 +1444,14 @@ impl ShapeState {
if select {
match selection_change {
SelectionChange::Shrink => state.deselect_point(id),
_ => state.select_point(id),
_ => {
// Select only the handles which are of nonzero length
if let Some(handle) = id.as_handle() {
if handle.length(&vector_data) > 0. {
state.select_point(id)
}
}
}
}
}
}