From 261b699dee3bf62ba2bbf6d4864554cfe4dc3150 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Tue, 21 Jul 2026 23:22:27 +0300 Subject: [PATCH] feat(edit): MATCHPROP stays active for repeated targets (#362) Applying to one target used to end the command. The apply now clears the consumed selection and keeps the command in its target phase, so properties can be painted onto object after object; Enter or Escape finishes (prompt updated accordingly). Co-Authored-By: Claude Fable 5 --- src/app/command_driver.rs | 14 ++++++++++---- src/modules/draw/properties/match_prop.rs | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/app/command_driver.rs b/src/app/command_driver.rs index e6b5e0a35..33f3b2e5a 100644 --- a/src/app/command_driver.rs +++ b/src/app/command_driver.rs @@ -864,10 +864,8 @@ impl OpenCADStudio { } } CmdResult::MatchProperties { dest, src } => { - self.tabs[i].active_cmd = None; - self.tabs[i].snap_result = None; - self.tabs[i].scene.clear_preview_wire(); - + // The command stays active after each apply so more targets + // can keep being picked; Enter / Esc ends it (#362). let props = self.tabs[i].scene.document.get_entity(src).map(|e| { let c = e.common(); ( @@ -924,8 +922,16 @@ impl OpenCADStudio { self.refresh_properties(); self.command_line .push_info(&format!("Properties matched to {} object(s).", dest.len())); + // Clear the consumed target selection and keep prompting. + self.tabs[i].scene.deselect_all(); + if let Some(cmd) = &self.tabs[i].active_cmd { + self.command_line.push_info(&cmd.prompt()); + } } else { self.command_line.push_error("Source object not found."); + self.tabs[i].active_cmd = None; + self.tabs[i].snap_result = None; + self.tabs[i].scene.clear_preview_wire(); } } CmdResult::PasteClipboard { base_pt } => { diff --git a/src/modules/draw/properties/match_prop.rs b/src/modules/draw/properties/match_prop.rs index 50af4005e..cd839fdd5 100644 --- a/src/modules/draw/properties/match_prop.rs +++ b/src/modules/draw/properties/match_prop.rs @@ -43,7 +43,7 @@ impl CadCommand for MatchPropCommand { if !self.phase1_done() { "MATCHPROP Select source object:".into() } else { - "MATCHPROP Select destination objects (Enter to apply):".into() + "MATCHPROP Select destination objects (Enter to finish):".into() } }