forked from 1b-agent/opencadstudio-upstream
fix(block): don't draw the tag for empty constant attributes
A constant ATTDEF renders as block content, but with an empty default value there is nothing to draw — the ATTDEF tessellator would fall back to its tag-placeholder preview (meant for standalone definitions), so blocks showed the literal tag text where AutoCAD shows nothing. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
bf06a8e330
commit
0a3862c54b
1 file changed
+7
-2
Vendored
+7
-2
@@ -348,8 +348,13 @@ fn build_defn(
|
||||
// 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 => {
|
||||
// invisible). With an empty value there is nothing to draw: the
|
||||
// ATTDEF tessellator would fall back to its tag-placeholder
|
||||
// preview, which belongs to a standalone definition, not to
|
||||
// placed block content.
|
||||
EntityType::AttributeDefinition(ad)
|
||||
if !ad.flags.constant || ad.flags.invisible || ad.default_value.is_empty() =>
|
||||
{
|
||||
continue
|
||||
}
|
||||
EntityType::Insert(nested_ins) => {
|
||||
|
||||
Reference in new issue
Block a user