feat(bedit): add Edit Block Definition dialog and new block authoring

Open the Edit Block Definition dialog when BEDIT is invoked without an active selection, listing candidate block definitions alphabetically while filtering layout records, anonymous blocks, and external references. Allow typing a new valid block name to start an empty block editor session that only commits to the drawing block table upon explicit save.
This commit is contained in:
Karim Jerbi committed 2026-10-14 14:46:48 +01:00
1 parent 9632979d09
commit abad1b9045
10 files changed
+719 -86

No files matched your search

+6
View File
@@ -574,6 +574,7 @@ pub(super) struct OpenCADStudio {
drawing_units: Option<crate::ui::window::drawing_units::State>,
/// Working copy of the Block Definition dialog; `None` while it is closed.
block_definition: Option<crate::ui::window::block_definition::BlockDefinitionState>,
block_edit_picker: Option<crate::ui::window::block_edit_picker::State>,
block_save_as: Option<crate::ui::window::block_save_as::State>,
/// PDF dialogs' working copies; `None` while closed.
pdf_attach: Option<crate::ui::window::pdf_dialogs::PdfAttachState>,
@@ -2190,6 +2191,7 @@ pub enum ModalKind {
DimStyle,
Unsaved,
BlockEditChanges,
BlockEditPicker,
BlockSaveAs,
SaveDialog,
Recovery,
@@ -2827,6 +2829,9 @@ pub enum Message {
BlockEditChangesCancel,
BlockSaveAsName(String),
BlockSaveAsApply,
BlockEditPickerName(String),
BlockEditPickerSelect(String),
BlockEditPickerApply,
// ── AEC / unsupported-object drop warning (lossy Save-As) ──────────────
/// Save as the source DWG version so the unsupported objects survive.
AecDropSameVersion,
@@ -4577,6 +4582,7 @@ impl OpenCADStudio {
layer_translator: None,
drawing_units: None,
block_definition: None,
block_edit_picker: None,
block_save_as: None,
pdf_attach: None,
point_cloud_attach: None,