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 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-07-21 09:32:44 +03:00
commit 8295d14c4e

View file

@ -555,6 +555,10 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
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;
}