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 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-15 13:27:30 +03:00
1 parent 540d5f7b78
commit fbac39462e
1 file changed
+7 -13
+7 -13
View File
@@ -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)) => {