feat(blocks): edit action selections and refresh evaluated references

Add BACTIONSET and the Block Editor Action Selection ribbon entry. Pick or preselect an action, replace/add/remove its drawing targets, or redefine a Stretch frame while preserving the native action and graph identity.

Retain existing Stretch vertex bindings during target edits and bind new targets against the stored frame. Allow removing invalid bindings or rebuilding them through a replacement frame. Rebuild evaluated references at their independent cached values so removed targets lose old action effects, with local undo, discard and one drawing save delta.

Validate synthetic native DWG/DXF roundtrips, shared COPY representations, stale-result guards, reference geometry refresh, frame/cancel/history and the real ribbon flyout. 347 block tests pass (6 existing opt-in ignored), plus 42 dock and 27 viewport tests.
This commit is contained in:
Karim Jerbi committed 2026-10-17 10:22:14 +01:00
1 parent 042f26a4cc
commit 7c91f5835e
15 files changed
+1083 -69

No files matched your search

+16
View File
@@ -150,6 +150,22 @@ impl OpenCADStudio {
candidate_handles.insert(record.block_end_handle);
}
}
// Action-set edits can rebuild anonymous references outside the editor
// definition. Include their entities in the single drawing save delta.
for document in [before_doc, &tab.scene.document] {
for entity in document.entities() {
if let EntityType::Insert(insert) = entity {
if document.dynamic_definition_for_insert(insert.common.handle)
== Some(session.br_handle)
{
candidate_handles.insert(insert.common.handle);
if let Some(record) = document.block_records.get(&insert.block_name) {
candidate_handles.extend(record.entity_handles.iter().copied());
}
}
}
}
}
let mut sub_handles = Vec::new();
for &h in &candidate_handles {
let entity_opt = before_doc