feat(dyn): locked input fields constrain the preview and the click (#356)

A typed dynamic-input value (TAB-locked angle or distance) now shapes
the rubber-band: the cursor point is routed through dyn_resolve_point —
the same resolution Enter commits — in the mouse-move preview and the
click commit, so a locked 30° pins the line's direction while the free
field keeps tracking the cursor. The lock wins over osnap/ortho/polar.
TAB (and the comma advance) reshape the preview immediately instead of
waiting for the next mouse move.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-07-21 23:58:05 +03:00
commit 7a93ba82b3
4 changed files with 39 additions and 0 deletions

View file

@ -799,6 +799,9 @@ impl OpenCADStudio {
let n = self.tabs[i].dyn_fields.len();
if n > 0 {
self.tabs[i].dyn_active = (self.tabs[i].dyn_active + 1) % n;
// TAB locks the value just typed — reshape the rubber-band
// to the constrained point now (#356).
self.refresh_active_cmd_preview(i);
}
self.focus_cmd_input()
}