EXTERNALREFERENCES opens, EXTERNALREFERENCESCLOSE, ERSTATE, reference aliases

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-10-13 15:25:25 +03:00
1 parent b1d4c9bd9b
commit 63bfb5d5b6
5 files changed
+31 -14

No files matched your search

+2 -1
View File
@@ -80,7 +80,7 @@ const WEB_ALIAS_KEY: &str = "opencadstudio.aliases";
/// migrated forward (see `introduced_at` / `migrate_aliases`). Version 1 shipped
/// the pre-REDRAW table; version 2 introduced the REDRAW-family aliases; version 3
/// introduced HB (HATCHTOBACK); version 4 introduced ER (EXTERNALREFERENCES).
const DEFAULT_ALIASES_VERSION: u32 = 7;
const DEFAULT_ALIASES_VERSION: u32 = 8;
#[cfg(target_arch = "wasm32")]
const WEB_ALIAS_VERSION_KEY: &str = "opencadstudio.aliases.version";
@@ -102,6 +102,7 @@ fn introduced_at(version: u32) -> &'static [(&'static str, &'static str)] {
5 => &[("-ATT", "-ATTDEF")],
6 => &[("VV", "QLAYER")],
7 => &[("DV", "DVIEW")],
8 => &[("-XR", "-XREF"), ("XC", "XCLIP"), ("ICL", "IMAGECLIP")],
_ => &[],
}
}
+21 -8
View File
@@ -951,17 +951,30 @@ impl OpenCADStudio {
}
}
// EXTERNALREFERENCES — toggle the docked External References panel.
// EXTERNALREFERENCES opens the docked External References panel
// (an open one stays open); EXTERNALREFERENCESCLOSE closes it.
// (XREFMAN was a provisional name and is not kept, not even as an
// alias.) The XREF command below is untouched.
"EXTERNALREFERENCES" => {
self.show_external_references ^= true;
if self.show_external_references {
// Always open expanded so the panel is immediately usable;
// dock it on the right if the user closed it from the layout.
self.dock_open_at_default(crate::ui::dock::PanelId::ExternalReferences);
self.refresh_xref_manager();
}
self.show_external_references = true;
// Always open expanded so the panel is immediately usable;
// dock it on the right if the user closed it from the layout.
self.dock_open_at_default(crate::ui::dock::PanelId::ExternalReferences);
self.refresh_xref_manager();
}
"EXTERNALREFERENCESCLOSE" => self.show_external_references = false,
// ERSTATE (read only): whether the panel is open.
cmd if cmd
.strip_prefix("SETVAR ")
.unwrap_or(cmd)
.split_whitespace()
.next()
.is_some_and(|name| name.eq_ignore_ascii_case("ERSTATE")) =>
{
self.command_line.push_output(&format!(
"ERSTATE = {} (read only)",
u8::from(self.show_external_references)
));
}
cmd if cmd.eq_ignore_ascii_case("XREF")
+2
View File
@@ -819,6 +819,8 @@ inventory::submit!(crate::command::CommandRegistration {
"EXPORTSTEP",
"EXPORTSTL",
"EXTERNALREFERENCES",
"EXTERNALREFERENCESCLOSE",
"ERSTATE",
"POINTCLOUDMANAGER",
"POINTCLOUDMANAGERCLOSE",
"EXTRIM",