feat(draw): continue paths on initial Enter

Start LINE, PLINE, ARC, and SPLINE from the latest path endpoint when Enter accepts the first point. Fall back to the active UCS origin.\n\nRefs #610
This commit is contained in:
Hakan Seven 2026-08-01 19:09:19 +03:00
commit dccaf95f49
10 changed files with 175 additions and 12 deletions

View file

@ -356,11 +356,7 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
}
if text.is_empty() {
let result = self.tabs[i].active_cmd.as_mut().map(|c| c.on_enter());
if let Some(r) = result {
return self.apply_cmd_result(r);
}
return Task::none();
return self.feed_command(crate::command::StepInput::Enter);
}
// OTRACK: while aligned to a tracking ray, a bare distance
@ -494,11 +490,7 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
}
let i = self.active_tab;
if self.tabs[i].active_cmd.is_some() {
let result = self.tabs[i].active_cmd.as_mut().map(|c| c.on_enter());
if let Some(r) = result {
return self.apply_cmd_result(r);
}
Task::none()
self.feed_command(crate::command::StepInput::Enter)
} else if let Some(cmd) = self.tabs[i].last_cmd.clone() {
self.dispatch_command(&cmd)
} else {

View file

@ -247,7 +247,7 @@ impl OpenCADStudio {
/// point has been committed to the active command. Temporary tracking
/// points are reset on every input so they don't pile up across a
/// multi-point command and overwhelm the next pick (issue #85).
fn reset_tracking_after_point(&mut self) {
pub(in crate::app) fn reset_tracking_after_point(&mut self) {
self.snapper.clear_tracking();
self.otrack_active = None;
}