forked from 1b-agent/opencadstudio-upstream
fix(xref): show merged xref layers in Layer Manager on attach (#407)
XATTACH / XRELOAD merge the xref's layer and linetype tables into the document, but the Layers panel cache only rebuilds via sync_with_viewports - which nothing triggered until the file was saved and reopened. Refresh the layer panel (and ribbon mirrors) right after the merge in both paths. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
e177f92ff5
commit
0cd991e42f
2 files changed
+8
No files matched your search
@@ -396,6 +396,10 @@ impl OpenCADStudio {
|
||||
&mut self.tabs[i].scene,
|
||||
&path,
|
||||
);
|
||||
// Resolving the xref merged its layer / linetype tables
|
||||
// into the document — mirror them into the Layers panel
|
||||
// and ribbon dropdowns now, not on the next reopen (#407).
|
||||
self.refresh_layer_panel();
|
||||
}
|
||||
// Record where this draw ended so ARC_CONT can continue from it
|
||||
// (before `entity` is moved into commit_entity).
|
||||
|
||||
@@ -540,6 +540,10 @@ impl OpenCADStudio {
|
||||
self.tabs[i].scene.populate_hatches_from_document();
|
||||
self.tabs[i].scene.populate_images_from_document();
|
||||
self.tabs[i].scene.populate_meshes_from_document();
|
||||
// The reload may have merged new xref layers /
|
||||
// linetypes — mirror them into the Layers panel and
|
||||
// ribbon dropdowns (#407).
|
||||
self.refresh_layer_panel();
|
||||
}
|
||||
} else {
|
||||
self.command_line
|
||||
|
||||
Reference in new issue
Block a user