fix(otrack): clear and localize tracking hint

This commit is contained in:
Hakan Seven committed 2026-08-09 13:04:55 +03:00
1 parent ae24f985f0
commit d80ee709ac
4 files changed
+9 -11

No files matched your search

+1 -2
View File
@@ -430,8 +430,7 @@ pub(super) struct OpenCADStudio {
/// cursor is on a tracking ray. Lets a typed distance place a point along
/// the ray from the tracking point (issue #69). `None` when not aligned.
otrack_active: Option<(glam::DVec3, glam::DVec3)>,
/// Kind of the currently active tracking reference, kept separately from
/// `otrack_active` so typed-distance behavior remains unchanged.
/// Active OTRACK ray kind, separate from typed-distance geometry.
otrack_kind: Option<crate::snap::TrackingKind>,
/// Whether Tangent snap was enabled before a tangent-pick command started.
pre_cmd_tangent: Option<bool>,
+2
View File
@@ -3137,6 +3137,8 @@ impl OpenCADStudio {
self.snapper.otrack_enabled ^= true;
if !self.snapper.otrack_enabled {
self.snapper.clear_tracking();
self.otrack_active = None;
self.otrack_kind = None;
}
Task::none()
}
+2 -2
View File
@@ -812,10 +812,10 @@ impl OpenCADStudio {
let tracking_hint = match self.otrack_kind {
Some(crate::snap::TrackingKind::Perpendicular) => {
Some("Perpendicular".to_string())
Some(crate::tr!("common", "perpendicular"))
}
Some(crate::snap::TrackingKind::Extension) => {
Some("Extension".to_string())
Some(crate::tr!("common", "extension"))
}
_ => None,
};