From fbac39462e8058f5650158462c37a1d8528a0fa0 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Mon, 15 Jun 2026 13:27:30 +0300 Subject: [PATCH] fix(input): command line coordinates are always absolute A bare command-line coordinate followed the DYN setting, so with dynamic input on it was treated as relative to the last point. AutoCAD keeps the command line absolute regardless of DYN; only the DYN tooltip defaults to relative. Resolve a bare command-line value as absolute and reserve relative for the explicit `@` prefix (`#` still forces absolute). The DYN tooltip path keeps its own relative-by-default behaviour. Co-Authored-By: Claude Opus 4.8 --- src/app/update.rs | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/app/update.rs b/src/app/update.rs index df4afa921..bee9796c0 100644 --- a/src/app/update.rs +++ b/src/app/update.rs @@ -1278,19 +1278,13 @@ impl OpenCADStudio { } if let Some((coord, kind)) = parse_coord(&text) { - // Resolve relative vs absolute. `@` forces relative, - // `#` forces absolute, no prefix follows DYN: when - // dynamic input is on, bare coordinates are relative - // to the last point (issue #26). - // `@` forces relative, `#` forces absolute, no - // prefix follows DYN (on → relative). The very - // first point has no reference, so relative falls - // back to absolute. - let want_relative = match kind { - CoordKind::Relative => true, - CoordKind::Absolute => false, - CoordKind::Default => self.dyn_input, - }; + // Command-line coordinates are absolute by default, + // independent of DYN: `@` forces relative, `#` forces + // absolute, and a bare value is absolute. (Relative-by- + // default lives in the DYN tooltip path — see + // `dyn_resolve_point` — matching AutoCAD, where the + // command line stays absolute regardless of DYN.) + let want_relative = matches!(kind, CoordKind::Relative); let ucs = self.tabs[i].active_ucs.clone(); let wcs_pt = match (want_relative, self.last_point) { (true, Some(base)) => {