forked from 1b-agent/opencadstudio-upstream
fix(xref): follow-ups to the xref attach parity merge
- `XREF <args>` runs whole: probing the bare verb first now opens the External References palette, which refreshed every entry and toggled the palette before `XREF Reload A` / `XREF ?` ran. - Update the two tests that encoded the old behaviour: `-XREF ?` prints the reference table, and attaching a missing file is rejected. - Drop the duplicate "Specify On-screen" catalog entry that shadowed the translated common key, with its unused ftl keys. - Move `remove_pipe_symbols`' doc comment back above its function. - Note in `document_for_save` that resolved xref content stays out. - Gate the desktop-only preview cap and tab index for wasm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1988424638
commit
163763c42a
27 files changed
+27
-35
No files matched your search
@@ -175,6 +175,7 @@ impl OpenCADStudio {
|
||||
path: &str,
|
||||
) -> (Vec<crate::scene::model::wire_model::WireModel>, i16) {
|
||||
// ponytail: a huge reference skips the ghost; cap by entity count.
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
const MAX_PREVIEW_ENTITIES: usize = 20_000;
|
||||
let scene = &self.tabs[i].scene;
|
||||
if let Some(name) = existing {
|
||||
@@ -264,6 +265,7 @@ impl OpenCADStudio {
|
||||
/// Fills the dialog from the chosen file: name, preview, block unit and
|
||||
/// the paths shown under Details.
|
||||
fn load_xref_attach_file(&self, state: &mut XrefAttachState, path: &str) {
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
let i = self.active_tab;
|
||||
state.path = path.to_string();
|
||||
state.name = path_to_block_name(path);
|
||||
|
||||
Reference in new issue
Block a user