fix(properties): normalize XLine direction edits

This commit is contained in:
ramox81 committed 2026-08-18 16:09:09 +03:00
1 parent 74c1fe48d8
commit 5bd104faab
1 file changed
+11 -8
+11 -8
View File
@@ -267,14 +267,17 @@ impl PropertyEditable for XLine {
self.set_direction(direction); self.set_direction(direction);
} }
} }
"xl_dx" => { "xl_dx" | "xl_dy" | "xl_dz" => {
self.direction.x = v; let mut direction = self.direction;
} match field {
"xl_dy" => { "xl_dx" => direction.x = v,
self.direction.y = v; "xl_dy" => direction.y = v,
} "xl_dz" => direction.z = v,
"xl_dz" => { _ => unreachable!(),
self.direction.z = v; }
if direction.length_squared() > 1e-18 {
self.set_direction(direction);
}
} }
_ => {} _ => {}
} }