forked from 1b-agent/opencadstudio-upstream
fix(block): render constant attributes; bump acadrust for multiline attrs
A CONSTANT ATTDEF has no per-insert ATTRIB — its value belongs to the block itself — so block expansion must draw it instead of skipping every ATTDEF. Non-constant templates are still skipped (the insert supplies their ATTRIB). Also bumps acadrust to decode the embedded MTEXT of R2018 multiline attributes, so a value like "A\PB" renders both lines. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
e26b1ad488
commit
0658601c41
2 files changed
+10
-4
No files matched your search
Vendored
+9
-3
@@ -312,9 +312,15 @@ fn build_defn(
|
||||
continue;
|
||||
}
|
||||
match entity {
|
||||
EntityType::Block(_)
|
||||
| EntityType::BlockEnd(_)
|
||||
| EntityType::AttributeDefinition(_) => continue,
|
||||
EntityType::Block(_) | EntityType::BlockEnd(_) => continue,
|
||||
// A non-constant ATTDEF is only a template — the insert supplies an
|
||||
// ATTRIB with the real value (tessellated separately). A CONSTANT
|
||||
// attribute has no ATTRIB; its value lives in the block itself, so
|
||||
// it must render as part of the block content (unless flagged
|
||||
// invisible).
|
||||
EntityType::AttributeDefinition(ad) if !ad.flags.constant || ad.flags.invisible => {
|
||||
continue
|
||||
}
|
||||
EntityType::Insert(nested_ins) => {
|
||||
subs.push(LocalSub::Nested(build_nested_ref(nested_ins, doc, bg_color)));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user