diff --git a/src/app/mod.rs b/src/app/mod.rs index d3d6f2047..d10711d34 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -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, /// Whether Tangent snap was enabled before a tangent-pick command started. pre_cmd_tangent: Option, diff --git a/src/app/update/mod.rs b/src/app/update/mod.rs index 5157fc682..ff5477306 100644 --- a/src/app/update/mod.rs +++ b/src/app/update/mod.rs @@ -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() } diff --git a/src/app/view/mod.rs b/src/app/view/mod.rs index 2784f7833..91bc6835e 100644 --- a/src/app/view/mod.rs +++ b/src/app/view/mod.rs @@ -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, }; diff --git a/src/ui/overlay.rs b/src/ui/overlay.rs index 416f06527..a2ea3b61d 100644 --- a/src/ui/overlay.rs +++ b/src/ui/overlay.rs @@ -2193,7 +2193,7 @@ struct DynInputCanvas { boxes: Vec, /// The active command's current prompt, drawn just above the boxes. prompt: String, - /// Informational tracking/reference mode currently engaged. + /// Active tracking-reference label. tracking_hint: Option, } @@ -2543,9 +2543,7 @@ impl DynInputCanvas { }; Self::draw_box(frame, b, center, bounds, theme); } - // Guided dynamic-input layouts place their editable boxes on the - // construction geometry, so keep the tracking-reference pill near - // the crosshair instead. + // Keep the tracking hint near the crosshair in guided layouts. if let Some(text) = self.tracking_hint.as_deref() { let hw = (text.len() as f32 * DYN_CHAR_W) + DYN_PAD * 2.0; @@ -2636,12 +2634,11 @@ impl DynInputCanvas { }); x += w + DYN_GAP; } - // Informational tracking reference, using the same pill style as - // the command prompt. Keep it below the editable value row. + // Place the tracking hint below the value row. if self.tracking_hint.is_some() { let mut hy = by + DYN_BOX_H + 3.0; - // If there is no room below, place it above the prompt/value block. + // Move above when bottom space is insufficient. if hy + DYN_BOX_H > bounds.height { hy = (py - DYN_BOX_H - 3.0).max(0.0); }