Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

Fix red main: give inspect.silhouette an icon; scroll to Colour vision in its scenario (#2134)

bherbrucke347f820e6f2
diff --git a/crates/engine/src/cmd/silhouette.rs b/crates/engine/src/cmd/silhouette.rs
index 97d34544cc..1f482f5d86 100644
--- a/crates/engine/src/cmd/silhouette.rs
+++ b/crates/engine/src/cmd/silhouette.rs
@@ -12,7 +12,7 @@ const CMD: &str = "inspect.silhouette";
const MAX_PIXELS: usize = 4 * 1024 * 1024;
// For agents comparing the model with a picture; nothing to show a person, so no toolbar button.
-pub static COMMANDS: &[CommandSpec] = &[CommandSpec::new(CMD, "Silhouette", run).noundo().params(
+pub static COMMANDS: &[CommandSpec] = &[CommandSpec::new(CMD, "Silhouette", run).icon("project").noundo().params(
"view?: front|back|left|right|top|bottom|iso (default front); or camera?: {target: [x,y,z], yaw, pitch, distance, fov?} (mm, radians; fov 0 means parallel); bodies?: [world body names] (default visible bodies, named hidden bodies included); rows?: mask height in pixels (default 240, clamped to 16..1024) → tightly framed run-length mask, box_mm, mm_per_px, right/up, projection, body and triangle counts",
)];
diff --git a/crates/ui-egui/tests/scenarios/colour_vision_setting.json b/crates/ui-egui/tests/scenarios/colour_vision_setting.json
index 0cb44845d2..6e1b350170 100644
--- a/crates/ui-egui/tests/scenarios/colour_vision_setting.json
+++ b/crates/ui-egui/tests/scenarios/colour_vision_setting.json
@@ -3,6 +3,7 @@
{"click": {"handle": "titlebar:preferences"}},
{"expect": {"prefs": {"dialog": "General", "color_vision": "off"}, "same_width": "prefs:window"}},
{"widget": "Graphics"},
+ {"call": "ui.scroll", "params": {"x": 800, "y": 500, "delta": -3000}},
{"expect": {"shown": "Colour vision", "prefs": {"dialog": "Graphics"}, "same_width": "prefs:window"}},
{"widget": "Off"},
{"widget": "Deutan"},
@@ -11,12 +12,14 @@
{"expect": {"prefs": {"dialog": null, "color_vision": "off"}}},
{"key": "Comma", "cmd": true},
{"widget": "Graphics"},
+ {"call": "ui.scroll", "params": {"x": 800, "y": 500, "delta": -3000}},
{"widget": "Off"},
{"widget": "Tritan"},
{"widget": "OK"},
{"expect": {"prefs": {"dialog": null, "color_vision": "tritan"}}},
{"key": "Comma", "cmd": true},
{"widget": "Graphics"},
+ {"call": "ui.scroll", "params": {"x": 800, "y": 500, "delta": -3000}},
{"expect": {"shown": "Tritan", "same_width": "prefs:window"}},
{"widget": "Restore Defaults"},
{"expect": {"prefs": {"color_vision": "off"}}},