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 <noreply@anthropic.com>
This commit is contained in:
David MannandClaude Opus 5.5 committed 2026-10-29 17:01:52 +01:00
1 parent 81feb006ba
commit 0dfbbbf1a9
1 file changed
+5 -5
+5 -5
View File
@@ -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() {