forked from 1b-agent/opencadstudio-upstream
fix(layers): close locked-layer gaps found in review
- Double-clicking a locked object no longer opens its text / attribute / in-place block editor. - Clicking a locked object during a command's object-gather no longer counts as completing the selection (don't set selection_just_completed on the locked path). - copy_entities skips locked entities. - The attribute editor's Apply refuses to write when the block's layer was locked while the dialog was open. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
56e1c03ac2
commit
2723e4d47f
3 files changed
+35
-12
No files matched your search
@@ -1286,6 +1286,14 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
|
||||
let Some(handle) = self.attr_editor_handle else {
|
||||
return Task::none();
|
||||
};
|
||||
// The block's layer may have been locked while the editor was open —
|
||||
// refuse to write attributes to a locked-layer block.
|
||||
if let Some(layer) = self.tabs[i].scene.locked_layer_name(handle) {
|
||||
self.command_line.push_info(&format!(
|
||||
"Object is on locked layer \"{layer}\" — unlock the layer to edit its attributes."
|
||||
));
|
||||
return Task::none();
|
||||
}
|
||||
// Snapshot the working copy so the document can be mutated while the
|
||||
// dialog's rows stay put (it remains open for further edits).
|
||||
let rows = self.attr_editor_rows.clone();
|
||||
|
||||
Reference in new issue
Block a user