forked from 1b-agent/opencadstudio-upstream
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:
1 parent
ca331fff48
commit
0be9c41773
25 files changed
+524
-118
No files matched your search
@@ -327,6 +327,9 @@ impl Scene {
|
||||
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||
pub fn update_entity(&mut self, mut entity: EntityType) -> bool {
|
||||
let handle = entity.common().handle;
|
||||
if self.is_layer_locked(handle) {
|
||||
return false;
|
||||
}
|
||||
let Some(existing) = self.document.get_entity(handle) else {
|
||||
return false;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user