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 <noreply@anthropic.com>
This commit is contained in:
parent
e177f92ff5
commit
0cd991e42f
2 changed files with 8 additions and 0 deletions
|
|
@ -396,6 +396,10 @@ impl OpenCADStudio {
|
||||||
&mut self.tabs[i].scene,
|
&mut self.tabs[i].scene,
|
||||||
&path,
|
&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
|
// Record where this draw ended so ARC_CONT can continue from it
|
||||||
// (before `entity` is moved into commit_entity).
|
// (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_hatches_from_document();
|
||||||
self.tabs[i].scene.populate_images_from_document();
|
self.tabs[i].scene.populate_images_from_document();
|
||||||
self.tabs[i].scene.populate_meshes_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 {
|
} else {
|
||||||
self.command_line
|
self.command_line
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue