forked from 1b-agent/opencadstudio-upstream
Block Definition dialog: preview, empty-block band, open in editor
The name card draws the selected objects, or the existing definition the name picks. OK with no objects shows an in-window band offering to select objects or to define an empty block. A switch opens the new block in the block editor once it is defined; it is remembered with the other dialog choices. Automation gains block_def_dialog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
39c3e9af58
commit
d69a5f0ac4
30 files changed
+329
-13
No files matched your search
@@ -810,6 +810,14 @@ impl OpenCADStudio {
|
||||
self.refresh_properties();
|
||||
self.note_recent_block(&name);
|
||||
self.refresh_block_palette();
|
||||
// The Block Definition dialog asked to edit the new block.
|
||||
if self
|
||||
.block_definition_open_editor
|
||||
.take()
|
||||
.is_some_and(|wanted| wanted.eq_ignore_ascii_case(&name))
|
||||
{
|
||||
return Some(self.dispatch_command(&format!("BEDIT_OPEN:{name}")));
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
self.discard_last_undo_entry(i);
|
||||
|
||||
Reference in new issue
Block a user