Block Attribute Manager window (BATTMAN / ATTMAN)

BATTMAN and ATTMAN open a manager for the attribute definitions of one
attributed block: block chips with reference counts and a pick button,
a table whose columns are chosen with chips, move up/down, remove, and
an edit card (Attribute / Text / Properties) for the selected row. Apply,
OK and Sync write the list back to the block definition and, when asked,
rebuild the existing references keeping values through tag renames;
each is one undo step. Live changes are taken back on Cancel. Automation
gains attman_dialog.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-15 10:10:54 +03:00
1 parent 39c3e9af58
commit 4726c775bf
35 files changed
+2083 -6

No files matched your search

+9
View File
@@ -232,6 +232,7 @@ impl OpenCADStudio {
}
Some(GeometricTolerance) => self.geometric_tolerance = None,
Some(BlockDefinition) => self.block_definition = None,
Some(AttMan) => self.attman = None,
Some(BlockEditPicker) => self.block_edit_picker = None,
Some(BlockSaveAs) => self.block_save_as = None,
Some(PdfAttach) => self.pdf_attach = None,
@@ -2407,6 +2408,7 @@ impl OpenCADStudio {
Message::PdfDialog(message) => self.update_pdf_dialog(message),
Message::AttdefDialog(message) => self.on_attdef_dialog(message),
Message::AttMan(message) => self.on_attman(message),
Message::FieldDialog(message) => self.on_field_dialog(message),
Message::RefEditDialog(message) => self.update_refedit_dialog(message),
Message::PcManager(message) => self.update_pc_manager(message),
@@ -9571,6 +9573,13 @@ impl OpenCADStudio {
self.close_field_dialog();
return Task::none();
}
// Closing the attribute manager is its Cancel: live changes
// are taken back.
if self.active_modal == Some(super::ModalKind::AttMan) {
return self.on_attman(
crate::ui::window::attman_dialog::AttManMsg::Cancel,
);
}
if matches!(
self.active_modal,
Some(super::ModalKind::AttDef | super::ModalKind::AttDefEdit)