forked from 1b-agent/opencadstudio-upstream
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 <[email protected]>
This commit is contained in:
1 parent
c1a697ad62
commit
8295d14c4e
1 file changed
+4
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user