forked from 1b-agent/opencadstudio-upstream
Expose Set to ByLayer in Modify with interactive selection
This commit is contained in:
1 parent
7d0c059b30
commit
bf590d7d26
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="M3 6h18M3 12h18M3 18h18"/><path stroke="#6DB7ED" d="m8 3-3 3 3 3m8 0 3 3-3 3m-8 0-3 3 3 3"/></svg>
|
||||
|
After Width: | Height: | Size: 263 B |
@@ -646,6 +646,13 @@ impl OpenCADStudio {
|
||||
// Resets the selected entities' direct property overrides back to
|
||||
// ByLayer so they follow their layer again.
|
||||
"SETBYLAYER" => {
|
||||
if self.tabs[i].scene.selected.is_empty() {
|
||||
use crate::modules::draw::select::SelectObjectsCommand;
|
||||
let selection = SelectObjectsCommand::new("SETBYLAYER");
|
||||
self.command_line.push_info(&selection.prompt());
|
||||
self.tabs[i].active_cmd = Some(Box::new(selection));
|
||||
return Some(self.finish_dispatch(cmd));
|
||||
}
|
||||
let handles: Vec<_> = self.tabs[i]
|
||||
.scene
|
||||
.selected_entities()
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
Tool {
|
||||
command: "SETBYLAYER",
|
||||
label: "Set to ByLayer",
|
||||
icon: include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/icons/modify_setbylayer.svg")),
|
||||
options: &[],
|
||||
}
|
||||
Reference in new issue
Block a user