feat(styles): seed current table/multileader style from the file

Bump acadrust to pick up the new $CTABLESTYLE / $CMLEADERSTYLE header
variables, then on load seed the ribbon's active table style and the
tab's active multileader style from the document header so the ✓ marks
the style the file actually declares (DXF). Set Current writes the header
field as the round-trip source of truth, and the style-manager staging
snapshot now covers it. sync_ribbon_styles honours the active table style
instead of always falling back to the first one.

DWG still leaves these at "Standard" until acadrust parses them from the
binary header.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-10 19:05:07 +03:00
1 parent b3ba3a53d1
commit e65a7a6d67
4 files changed
+36 -5

No files matched your search

+6
View File
@@ -473,6 +473,8 @@ impl OpenCADStudio {
current_text: doc.header.current_text_style_name.clone(),
current_dim: doc.header.current_dimstyle_name.clone(),
multiline_style: doc.header.multiline_style.clone(),
current_table: doc.header.current_table_style_name.clone(),
current_mleader: doc.header.current_mleader_style_name.clone(),
active_table: self.ribbon.active_table_style.clone(),
active_mleader: self.ribbon.active_mleader_style.clone(),
tab_active_mleader: self.tabs[i].active_mleader_style.clone(),
@@ -500,6 +502,8 @@ impl OpenCADStudio {
doc.header.current_text_style_name = snap.current_text.clone();
doc.header.current_dimstyle_name = snap.current_dim.clone();
doc.header.multiline_style = snap.multiline_style.clone();
doc.header.current_table_style_name = snap.current_table.clone();
doc.header.current_mleader_style_name = snap.current_mleader.clone();
self.ribbon.active_table_style = snap.active_table.clone();
self.ribbon.active_mleader_style = snap.active_mleader.clone();
self.tabs[i].active_mleader_style = snap.tab_active_mleader.clone();
@@ -563,6 +567,8 @@ pub(super) struct StyleStateSnapshot {
current_text: String,
current_dim: String,
multiline_style: String,
current_table: String,
current_mleader: String,
active_table: String,
active_mleader: String,
tab_active_mleader: String,