From 3ae291255852f81eb05888c60ac3a66d890490b6 Mon Sep 17 00:00:00 2001 From: ramox81 <184937705+ramox81@users.noreply.github.com> Date: Fri, 2 Oct 2026 18:07:31 +0300 Subject: [PATCH] fix(insert): ATTREQ 0 inserts attributes with their defaults, without prompting Co-Authored-By: Claude Opus 5.5 --- src/app/command_driver/entity_commit.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/command_driver/entity_commit.rs b/src/app/command_driver/entity_commit.rs index 08c948bd6..4656fab0c 100644 --- a/src/app/command_driver/entity_commit.rs +++ b/src/app/command_driver/entity_commit.rs @@ -984,7 +984,7 @@ impl OpenCADStudio { let i = self.active_tab; // Collect the full AttributeDefinitions owned by this block // record so each created attribute keeps its geometry (#255). - let attdefs: Vec = { + let mut attdefs: Vec = { let doc = &self.tabs[i].scene.document; if let Some(br) = doc.block_records.get(&block_name) { br.entity_handles @@ -1004,6 +1004,12 @@ impl OpenCADStudio { } }; + // ATTREQ 0: attributes take their defaults without prompting. + if !self.tabs[i].scene.document.header.attribute_request { + for attdef in &mut attdefs { + attdef.flags.preset = true; + } + } if attdefs.is_empty() { // No attribute definitions — commit the INSERT directly. let entity = self.tabs[i]