diff --git a/crates/tools/src/select.rs b/crates/tools/src/select.rs index 8fc737937..61d215069 100644 --- a/crates/tools/src/select.rs +++ b/crates/tools/src/select.rs @@ -1133,8 +1133,9 @@ impl Tool for SelectionTool { } // A selected object's centre point (Show Center): a press there moves it, where the art // may not reach. The box's handles and the ruler guides take a press before it, so they - // take the pointer too (on a thin box the centre lies within a handle's reach). - if near_selected && hit_center(cx, p, cx.point_tol()).is_some() { + // take the pointer too (on a thin box the centre lies within a handle's reach), and with + // Cmd/Ctrl held the press selects the object behind instead. + if near_selected && !m.cmd && hit_center(cx, p, cx.point_tol()).is_some() { return Cursor::Move; } // View → Snap to Point: over an anchor a press would grab the object by, the arrow turns diff --git a/crates/tools/src/select/tests.rs b/crates/tools/src/select/tests.rs index c37a35455..eb926ffbc 100644 --- a/crates/tools/src/select/tests.rs +++ b/crates/tools/src/select/tests.rs @@ -2153,6 +2153,8 @@ fn a_press_on_the_centre_point_moves_an_unfilled_shape() { let centre = Point::new(150.0, 150.0); let mut t = SelectionTool::default(); assert_eq!(t.cursor(&c, centre, Mods::default()), Cursor::Move); + // Cmd/Ctrl selects the object behind, not the centre point, so the pointer says neither. + assert_ne!(t.cursor(&c, centre, Mods { cmd: true, ..Mods::default() }), Cursor::Move); assert!(t.pointer(&c, &ev(PointerKind::Down, centre.x, centre.y)).is_empty()); let a = t.pointer(&c, &ev(PointerKind::Drag, 170.0, 160.0)); assert_eq!(a.first(), Some(&Action::Begin("Move".into())), "{a:?}");