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 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Fable 5 committed 2026-07-21 23:22:27 +03:00
1 parent 3207cb391b
commit 261b699dee
2 files changed
+11 -5

No files matched your search

+10 -4
View File
@@ -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 } => {
+1 -1
View File
@@ -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()
}
}