mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-19 00:17:32 +00:00
#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.
This commit is contained in:
1 parent
2f0979f61f
commit
137d7c2df1
1 file changed
+4
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user