diff --git a/src/app/command_driver.rs b/src/app/command_driver.rs index e6a4007b8..58d352c2a 100644 --- a/src/app/command_driver.rs +++ b/src/app/command_driver.rs @@ -218,6 +218,17 @@ impl OpenCADStudio { } } CmdResult::CommitEntity(entity) => { + // A line/arc drawn by a repeating command advances the ARC_CONT + // continuation anchor, so ending one run and launching another + // keeps continuing from the last segment (mirrors the + // CommitAndExit arm). Non-continuable repeats (point/ray/spline) + // leave the anchor untouched. (#327) + if matches!( + entity, + acadrust::EntityType::Line(_) | acadrust::EntityType::Arc(_) + ) { + self.update_cont_anchor(&entity); + } let label = self.history_label_from_active_cmd(i, "ENTITY"); self.push_undo_snapshot(i, label); self.commit_entity(entity); diff --git a/src/modules/draw/draw/arc.rs b/src/modules/draw/draw/arc.rs index fa4a4c86f..80b5abfcb 100644 --- a/src/modules/draw/draw/arc.rs +++ b/src/modules/draw/draw/arc.rs @@ -1359,9 +1359,19 @@ impl CadCommand for ArcContCommand { fn on_point(&mut self, pt: DVec3) -> CmdResult { match arc_continue(self.s, self.tangent, pt, self.ctrl) { Some((center, radius, sa, ea)) => { - CmdResult::CommitAndExit(make_arc(center, radius, sa, ea)) + let arc = make_arc(center, radius, sa, ea); + // Keep drawing: re-anchor at the arc just committed so the next + // click starts another tangent-continuing arc from its end, + // until the user ends the run with Enter/Esc (#327). + if let Some((end, tangent)) = continue_anchor(&arc, Some(pt)) { + self.s = end; + self.tangent = tangent; + } + CmdResult::CommitEntity(arc) } - None => CmdResult::Cancel, + // A degenerate pick (no arc through these points) shouldn't end the + // whole run — stay active and wait for the next end point. + None => CmdResult::NeedPoint, } } fn on_enter(&mut self) -> CmdResult {