From 1c37c90c7597187112dd878b8e146347a5e4c8db Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Wed, 7 Oct 2026 08:50:03 +0300 Subject: [PATCH] feat(grips): the crosshair locks onto a hovered grip Before a grip is picked, the crosshair now jumps to the grip under it, so the click lands where the marker shows. Discussion #1557 Co-Authored-By: Claude Opus 5.5 --- src/ui/overlay.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/overlay.rs b/src/ui/overlay.rs index e32cb2866..6aa3263ad 100644 --- a/src/ui/overlay.rs +++ b/src/ui/overlay.rs @@ -1898,7 +1898,10 @@ impl canvas::Program for SelectionCanvas { && !self.suppressed && self.crosshair.cursor_type == CursorType::Crosshair { - if let Some(cp) = self.selection.borrow().input.last_move_pos { + // Over a grip the crosshair locks onto it, so the click lands on + // the grip exactly. + let hovered_grip = self.grips.iter().find(|grip| grip.is_hovered).map(|grip| grip.pos); + if let Some(cp) = hovered_grip.or(self.selection.borrow().input.last_move_pos) { let [r, g, b, a] = self.crosshair.color.map_or_else( || { crate::scene::view::render::adapt_to_bg(