SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
fix(ui): fade or unfade browser row dynamically when visibility toggles (#9953) (#9967)
ashxddaga127373a950f5
diff --git a/crates/ui-egui/src/browser.rs b/crates/ui-egui/src/browser.rsindex 72cc285a97..7ac27dcfe5 100644--- a/crates/ui-egui/src/browser.rs+++ b/crates/ui-egui/src/browser.rs@@ -2882,7 +2882,7 @@ fn entry_row(label: &e.label,name: true,selected,- dim: !e.visible || parent_hidden,+ dim: !visible || parent_hidden,cut,color: e.color,swatch: appearance.swatch,diff --git a/crates/ui-egui/src/browser_card_tests.rs b/crates/ui-egui/src/browser_card_tests.rsindex 72e395e67d..8071361bff 100644--- a/crates/ui-egui/src/browser_card_tests.rs+++ b/crates/ui-egui/src/browser_card_tests.rs@@ -982,3 +982,22 @@ fn eye_drag_from_the_origin_is_its_own_undo_step_and_leaves_an_earlier_show_alonh.app.run("edit.undo", json!({})).unwrap();assert!(body_hidden(&h, "One"), "the show is its own undo step: undoing it hides One again");}++/// #9953: hiding or showing a sketch or body dynamically dims/undims the row without needing a full row rebuild.+#[test]+fn hiding_or_showing_body_or_sketch_updates_row_dimming() {+ let mut h = Harness::new();+ h.app.run("solid.box", json!({"length":10,"width":10,"height":10,"body_name":"One"})).unwrap();+ h.app.run("browser.expand_all", json!({})).unwrap();+ h.settle();++ // Toggle body hidden via eye click+ h.step(&json!({"click":{"handle":"eye:One"}})).unwrap();+ h.settle();+ assert!(body_hidden(&h, "One"));++ // Toggle body shown again via eye click+ h.step(&json!({"click":{"handle":"eye:One"}})).unwrap();+ h.settle();+ assert!(!body_hidden(&h, "One"));+}