Expose Set to ByLayer in Modify with interactive selection

This commit is contained in:
ramox81 committed 2026-09-11 09:34:19 +03:00
1 parent 7d0c059b30
commit bf590d7d26
3 files changed
+14

No files matched your search

+7
View File
@@ -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: &[],
}