From 0dfbbbf1a93d3aa80feda6fcef26c5eefe86c933 Mon Sep 17 00:00:00 2001 From: David Mann Date: Thu, 29 Oct 2026 17:01:52 +0100 Subject: [PATCH] Crop: the click guard skips the snap on release again An earlier merge (f35107a8ea, snap_ui.rs moved into canvas/) applied the guard's hunk to the Move branch, whose context lines match the Up branch's. A click has no Move, so its release still snapped the frame and the test a_click_on_the_frame_or_a_handle_never_snaps_it failed. The guard is back on Up, where a release at the press point leaves the frame alone. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/canvas/snap_ui.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/ui-egui/src/canvas/snap_ui.rs b/crates/ui-egui/src/canvas/snap_ui.rs index 92123bb38b..d52e6f28cb 100644 --- a/crates/ui-egui/src/canvas/snap_ui.rs +++ b/crates/ui-egui/src/canvas/snap_ui.rs @@ -526,11 +526,6 @@ pub fn filter_event(app: &mut PhotocraftApp, ev: ToolEvent, mods: egui::Modifier if app.prefs_rt.snap.is_none() { return ev; } - if crop_click(app, [x, y]) { - app.prefs_rt.snap = None; - app.prefs_rt.snap_lines.clear(); - return ev; - } follow_reposition(app); let disabled = override_for_gesture(app, mods); if let Some(s) = app.prefs_rt.snap.as_mut() { @@ -544,6 +539,11 @@ pub fn filter_event(app: &mut PhotocraftApp, ev: ToolEvent, mods: egui::Modifier if app.prefs_rt.snap.is_none() { return ev; } + if crop_click(app, [x, y]) { + app.prefs_rt.snap = None; + app.prefs_rt.snap_lines.clear(); + return ev; + } follow_reposition(app); let disabled = override_for_gesture(app, mods); if let Some(s) = app.prefs_rt.snap.as_mut() {