From 23abc4302bb381bce0c110ccdf852cf128cc1bc6 Mon Sep 17 00:00:00 2001 From: mroxso <24775431+mroxso@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:43:21 +0200 Subject: [PATCH] fix(ui): default the Move tool Auto-Select target to Group (#4056) (#4093) Photoshop ships with Auto-Select on and its target set to Group; PhotoCraft defaulted to Layer. ToolOptions::default and the serde default now return "group"; saved preferences keep their stored value. Co-authored-by: highperfocused --- crates/ui-egui/src/move_auto_select_tests.rs | 4 ++-- crates/ui-egui/src/state.rs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/ui-egui/src/move_auto_select_tests.rs b/crates/ui-egui/src/move_auto_select_tests.rs index 03ad1c21e4..0f01222a57 100644 --- a/crates/ui-egui/src/move_auto_select_tests.rs +++ b/crates/ui-egui/src/move_auto_select_tests.rs @@ -51,10 +51,10 @@ fn drag(app: &mut PhotocraftApp, from: [f64; 2], by: [f64; 2], mods: egui::Modif } #[test] -fn auto_select_is_on_by_default_with_the_layer_target() { +fn auto_select_is_on_by_default_with_the_group_target() { let o = ToolOptions::default(); assert!(o.move_auto_select, "Photoshop ships with Auto-Select checked"); - assert_eq!(o.move_target, "layer"); + assert_eq!(o.move_target, "group", "Photoshop defaults Auto-Select to Group (#4056)"); // A saved tool preset that predates the option gets the default too. let mut v = serde_json::to_value(&o).unwrap(); v.as_object_mut().unwrap().remove("move_auto_select"); diff --git a/crates/ui-egui/src/state.rs b/crates/ui-egui/src/state.rs index ee348d982b..02b4f005db 100644 --- a/crates/ui-egui/src/state.rs +++ b/crates/ui-egui/src/state.rs @@ -594,7 +594,8 @@ pub struct ToolOptions { #[serde(default = "one")] pub marquee_height: f32, /// Move tool: Auto-Select (with "layer" or "group" target) and Show Transform Controls. - /// Auto-Select is on by default, as in current Photoshop; ⌘/Ctrl-click inverts it. + /// Auto-Select is on with the "group" target by default, as in current Photoshop; + /// ⌘/Ctrl-click inverts it. #[serde(default = "yes")] pub move_auto_select: bool, #[serde(default = "default_move_target")] @@ -706,7 +707,7 @@ fn default_crop_resolution_unit() -> String { } fn default_move_target() -> String { - "layer".into() + "group".into() } fn default_curve_fit() -> f32 {