From 92ce142c0338f995aa8ab1015beae1f69b9dd8fd Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sat, 19 Sep 2026 23:06:09 +0300 Subject: [PATCH] fix: drop the stray lock fixture; align merged plot code across targets - tests/fixtures/plot/.page-setups-metric.dxf.ocs.lock was the app's own single-instance lock file, committed by accident in #1343; remove it and ignore *.ocs.lock. - load_plotsettings_into_dialog: #1343's refresh_custom_scale_fields borrowed self while #1360 still wrote through the plot_dialog borrow; write the style error first. - The wasm list_printers stub returns the Result #1358 gave the native one. Co-Authored-By: Claude Fable 5.1 --- .gitignore | 3 +++ src/app/update/file.rs | 2 +- src/io/print_to_printer.rs | 4 ++-- tests/fixtures/plot/.page-setups-metric.dxf.ocs.lock | 1 - 4 files changed, 6 insertions(+), 4 deletions(-) delete mode 100644 tests/fixtures/plot/.page-setups-metric.dxf.ocs.lock diff --git a/.gitignore b/.gitignore index d46af8231..3684cd6dc 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,6 @@ __pycache__/ # Worktrees created for isolated runs .claude/worktrees/ + +# Single-instance lock files the app writes next to an open drawing +*.ocs.lock diff --git a/src/app/update/file.rs b/src/app/update/file.rs index 915fc0afa..bb43488b2 100644 --- a/src/app/update/file.rs +++ b/src/app/update/file.rs @@ -5119,8 +5119,8 @@ impl OpenCADStudio { d.apply_plot_styles = ps.flags.plot_plot_styles; d.show_plot_styles = ps.flags.show_plot_styles; d.style_missing = !d.style_name.is_empty() && !style_loaded; - self.refresh_custom_scale_fields(); d.style_error = if d.style_missing { style_error } else { None }; + self.refresh_custom_scale_fields(); } /// Tell the user what a plot style table's loader had to tolerate. diff --git a/src/io/print_to_printer.rs b/src/io/print_to_printer.rs index 258928f73..ad68fea52 100644 --- a/src/io/print_to_printer.rs +++ b/src/io/print_to_printer.rs @@ -56,8 +56,8 @@ pub struct PrintOptions { } #[cfg(target_arch = "wasm32")] -pub fn list_printers() -> Vec { - Vec::new() +pub fn list_printers() -> Result, String> { + Ok(Vec::new()) } #[cfg(target_arch = "wasm32")] diff --git a/tests/fixtures/plot/.page-setups-metric.dxf.ocs.lock b/tests/fixtures/plot/.page-setups-metric.dxf.ocs.lock deleted file mode 100644 index c6d7f094a..000000000 --- a/tests/fixtures/plot/.page-setups-metric.dxf.ocs.lock +++ /dev/null @@ -1 +0,0 @@ -Open CAD Studio pid=898490 path=/home/panos/OpenCADStudio/tests/fixtures/plot/page-setups-metric.dxf