fix(layers): protect locked entities

Keep locked-layer objects selectable for inspection while suppressing grips, property edits, command mutations, and stale editor writes.
This commit is contained in:
Hakan Seven committed 2026-08-12 12:46:41 +03:00
1 parent ca331fff48
commit 0be9c41773
25 files changed
+524 -118

No files matched your search

+3
View File
@@ -399,6 +399,7 @@ impl OpenCADStudio {
self.tabs[i].dirty = true;
self.commit_layer_undo(i, undo);
self.refresh_layer_panel();
self.refresh_properties();
self.command_line.push_info(crate::t!("Layer(s) locked.").as_ref());
}
}
@@ -508,6 +509,7 @@ impl OpenCADStudio {
self.tabs[i].dirty = true;
self.commit_layer_undo(i, undo);
self.refresh_layer_panel();
self.refresh_properties();
self.command_line.push_info(crate::t!("Layer(s) unlocked.").as_ref());
}
}
@@ -686,6 +688,7 @@ impl OpenCADStudio {
.selected_entities()
.into_iter()
.map(|(h, _)| h)
.filter(|handle| !self.tabs[i].scene.is_layer_locked(*handle))
.collect();
if handles.is_empty() {
use crate::modules::draw::groups::ungroup::UngroupCommand;