From 137d7c2df14b6939db47bce19b72a9e6190a6c1c Mon Sep 17 00:00:00 2001 From: Fabio Lissi Date: Mon, 12 Oct 2026 19:44:01 -0500 Subject: [PATCH] Tests: set the Move tool's Auto-Select target to Layer in the layout_perf clicks (#4056) (#4548) #4093 changed the Auto-Select default to Group, as in Photoshop. The two layout_perf tests that click layers inside groups with Auto-Select on expected the layer under the pointer, so they now select the group and fail on main. They set the target to Layer explicitly, which is what they test. --- crates/ui-egui/tests/layout_perf.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ui-egui/tests/layout_perf.rs b/crates/ui-egui/tests/layout_perf.rs index 502390c979..fb17833e18 100644 --- a/crates/ui-egui/tests/layout_perf.rs +++ b/crates/ui-egui/tests/layout_perf.rs @@ -132,6 +132,9 @@ fn auto_select_moves_the_layer_under_the_pointer() { actual_pixels(&mut h); h.state_mut().ui.tool = Tool::Move; h.state_mut().ui.tool_options.move_auto_select = true; + // The default target is Group (#4056); these layers sit in groups, and the test is about the + // layer under the pointer. + h.state_mut().ui.tool_options.move_target = "layer".into(); h.state_mut().run("layer.select", json!({"layer": k.pixel.0})).expect("select"); h.run_steps(2); let (pixel_before, text_before) = (bounds(&h, k.pixel), bounds(&h, k.text)); @@ -150,6 +153,7 @@ fn a_move_tool_click_selects_without_moving() { let (mut h, k) = app(); h.state_mut().ui.tool = Tool::Move; h.state_mut().ui.tool_options.move_auto_select = true; + h.state_mut().ui.tool_options.move_target = "layer".into(); for id in [k.text, k.shape, k.pixel, k.text] { let before = (bounds(&h, id), h.state().session.active().expect("doc").history.entries().len()); let p = screen(&h, point_on(&h, id));