forked from 1b-agent/opencadstudio-upstream
Expose Copy Nested Objects in the Modify extension
This commit is contained in:
1 parent
7d0c059b30
commit
0af477544d
3 files changed
+14
No files matched your search
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#B4B6B9" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h12v13H2Z"/><path stroke="#6DB7ED" d="M10 11h12v11H10ZM6 7h5v5H6Z"/></svg>
|
||||
|
After Width: | Height: | Size: 243 B |
@@ -659,6 +659,13 @@ impl OpenCADStudio {
|
||||
// every nested object is copied — the block is not exploded).
|
||||
"NCOPY" | "NCOPYALL" => {
|
||||
use crate::modules::draw::modify::explode::explode_entity;
|
||||
if cmd == "NCOPY" && self.tabs[i].scene.selected.is_empty() {
|
||||
use crate::modules::draw::select::SelectObjectsCommand;
|
||||
let selection = SelectObjectsCommand::new("NCOPY");
|
||||
self.command_line.push_info(&selection.prompt());
|
||||
self.tabs[i].active_cmd = Some(Box::new(selection));
|
||||
return Some(self.finish_dispatch(cmd));
|
||||
}
|
||||
let inserts: Vec<acadrust::Handle> = self.tabs[i]
|
||||
.scene
|
||||
.selected_entities()
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
Tool {
|
||||
command: "NCOPY",
|
||||
label: "Copy Nested Objects",
|
||||
icon: include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/icons/modify_ncopy.svg")),
|
||||
options: &[],
|
||||
}
|
||||
Reference in new issue
Block a user