Fix debug assert failure from selecting zero-sized objects

This commit is contained in:
Keavon Chambers
2026-02-15 00:01:09 -08:00
parent 84f91eb795
commit c574f58ecd
3 changed files with 23 additions and 1 deletions
@@ -27,6 +27,9 @@ impl CompassRose {
.selected_nodes()
.selected_visible_and_unlocked_layers(&document.network_interface)
.filter_map(|layer| {
if transform.matrix2.determinant().abs() <= f64::EPSILON {
return None;
}
document
.metadata()
.bounding_box_with_transform(layer, transform.inverse() * document.metadata().transform_to_viewport(layer))
@@ -241,6 +241,9 @@ impl Pivot {
.selected_nodes()
.selected_visible_and_unlocked_layers(&document.network_interface)
.filter_map(|layer| {
if transform.matrix2.determinant().abs() <= f64::EPSILON {
return None;
}
document
.metadata()
.bounding_box_with_transform(layer, transform.inverse() * document.metadata().transform_to_viewport(layer))