forked from 1b-agent/opencadstudio-upstream
fix(layer): keep auto-registered layer names verbatim; one sync helper
ensure_layer had started trimming the name, so an entity on " A" got a table entry "A" it never resolves to. Register the name as given again and drop the unused return value. The five copies of the dirty-flag check become sync_registered_layers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1b04bda547
commit
e3c0d456f2
4 files changed
+20
-32
No files matched your search
@@ -68,6 +68,15 @@ impl OpenCADStudio {
|
||||
self.sync_ribbon_layers();
|
||||
}
|
||||
|
||||
/// Pick up layers an entity edit registered on the fly (`ensure_layer`).
|
||||
pub(super) fn sync_registered_layers(&mut self, tab: usize) {
|
||||
if !std::mem::take(&mut self.tabs[tab].scene.layer_table_dirty) {
|
||||
return;
|
||||
}
|
||||
self.tabs[tab].dirty = true;
|
||||
self.refresh_layer_panel();
|
||||
}
|
||||
|
||||
pub(super) fn sync_ribbon_layers(&mut self) {
|
||||
let i = self.active_tab;
|
||||
// The Start (welcome) tab has no document — leave the layer and
|
||||
|
||||
Reference in new issue
Block a user