mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-03 02:25:55 +00:00
- In entry_row (crates/ui-egui/src/browser.rs), use live rather than cached for the property - Ensures eye toggle dynamically fades or unfades rows for sketches and bodies without requiring a cache rebuild - Add regression test in browser_card_tests Fixes #9953
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -982,3 +982,22 @@ fn eye_drag_from_the_origin_is_its_own_undo_step_and_leaves_an_earlier_show_alon
|
||||
h.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"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user