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 <[email protected]>
This commit is contained in:
mroxsoandhighperfocused authored and GitHub committed 2026-10-12 18:43:21 -04:00
1 parent 049a92c288
commit 23abc4302b
2 files changed
+5 -4

No files matched your search

+2 -2
View File
@@ -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");
+3 -2
View File
@@ -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 {