forked from 1b-agent/opencadstudio-upstream
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 <[email protected]>
This commit is contained in:
1 parent
3207cb391b
commit
261b699dee
2 files changed
+11
-5
No files matched your search
@@ -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 } => {
|
||||
|
||||
Reference in new issue
Block a user