fix(layer): refresh ribbon and layer panel when entities register novel layers

This commit is contained in:
yztink committed 2026-10-02 23:17:08 -07:00
1 parent 3f54f2f494
commit 9345c7799c
6 files changed
+82 -6

No files matched your search

+6 -1
View File
@@ -200,6 +200,7 @@ impl OpenCADStudio {
pub(super) fn handle_commit_and_exit(
&mut self,
entity: codec::EntityType,
preserve_commit_layer: bool,
) -> Option<Task<Message>> {
let i = self.active_tab;
// XATTACH: the definition and its INSERT are created together
@@ -255,7 +256,11 @@ impl OpenCADStudio {
);
let association_enabled =
self.tabs[i].scene.document.header.dimension_associativity == 2;
let committed = self.commit_entity_handle(entity);
let committed = if preserve_commit_layer {
self.commit_entity_handle_preserve_layer(entity)
} else {
self.commit_entity_handle(entity)
};
if is_associative_dimension && association_enabled {
if let Some(handle) = committed {
let sources = self.infer_dimension_sources_guarded(i, handle);