forked from 1b-agent/opencadstudio-upstream
Xref attach: Attach dialog, reference prompts, and xref drawings other applications can open
Attach External Reference dialog after XATTACH / ATTACH; ATTACH routes drawings, PDFs and images; placement prompts and messages follow the reference (presets, Corner/XYZ, nonzero check, existing definition reuse, missing file, self-reference); name keeps the file's case; overlay and path type at attach; one undo step for definition and INSERT; -XREF option prompt and `?` table; XREF opens the palette; ER alias; xref Properties rows; dependent symbols flagged and remapped and resolved content left out of the saved file; dialog_ok automation action; localized labels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f2d534bf71
commit
6bd55bc32e
44 files changed
+2514
-359
No files matched your search
@@ -47,6 +47,7 @@ fn color_value(color: acadrust::types::Color) -> Value {
|
||||
}
|
||||
pub(super) const NAMES: &[&str] = &[
|
||||
"close_modal",
|
||||
"dialog_ok",
|
||||
"close_document",
|
||||
"toggle_properties",
|
||||
"toggle_layers",
|
||||
@@ -255,6 +256,14 @@ impl OpenCADStudio {
|
||||
let name = string(req, "name")?;
|
||||
let msg = match name {
|
||||
"close_modal" => Message::CloseModal,
|
||||
// The open dialog's OK button.
|
||||
"dialog_ok" => match self.active_modal {
|
||||
Some(crate::app::ModalKind::XrefAttach) => Message::XrefAttach(
|
||||
crate::ui::window::xref_attach::XrefAttachMsg::Apply,
|
||||
),
|
||||
Some(crate::app::ModalKind::BlockDefinition) => Message::BlockDefApply,
|
||||
_ => return Err(failure("no_dialog", "No dialog with an OK button is open")),
|
||||
},
|
||||
"close_document" => Message::TabClose(self.active_tab),
|
||||
"toggle_properties" => Message::ToggleProperties,
|
||||
"toggle_layers" => Message::ToggleLayers,
|
||||
|
||||
Reference in new issue
Block a user