From 8295d14c4e052122fa0fe11492a181253bbd6374 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Tue, 21 Jul 2026 09:32:44 +0300 Subject: [PATCH] fix(select): Esc fully cancels a box selection across pans The Esc path cleared box_anchor but left box_anchor_world behind, so the next middle-button pan re-projected the world anchor back into box_anchor (the #234 camera-tracking path) and the cancelled marquee sprang back to life. Clear the world anchor too, matching the other cancellation sites. Co-Authored-By: Claude Fable 5 --- src/app/update/command.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/update/command.rs b/src/app/update/command.rs index 7de37ca4..2f474227 100644 --- a/src/app/update/command.rs +++ b/src/app/update/command.rs @@ -555,6 +555,10 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task { self.refresh_properties(); let mut sel = self.tabs[i].scene.selection.borrow_mut(); sel.box_anchor = None; + // Also drop the world-space anchor, or the next pan/zoom + // re-projects it back into `box_anchor` and the cancelled + // marquee springs back to life (reproject_box_anchor). + sel.box_anchor_world = None; sel.box_current = None; sel.box_crossing = false; }