fix(grips): capture placement clicks first

This commit is contained in:
Hakan Seven committed 2026-09-02 17:46:49 +03:00
1 parent 708c30831c
commit 2bb491d874
1 file changed
+13 -12
+13 -12
View File
@@ -2690,6 +2690,19 @@ impl OpenCADStudio {
};
let (vw, vh) = vp_size;
// An engaged grip owns the next left press (click-move-click placement
// or the release of a press-drag). Do not let the same press arm the
// normal box/lasso state or trigger another viewport control; the
// release path below will commit the grip.
if self.tabs[i].active_grip.is_some() {
self.tabs[i]
.scene
.selection
.borrow_mut()
.clear_left_selection_gesture();
return Task::none();
}
// Interactive navigation tools reuse the middle-button movement path,
// so no selection/pick logic runs while the left button drives them.
if self.tabs[i].orbit_mode
@@ -2784,18 +2797,6 @@ impl OpenCADStudio {
height: vh,
};
// An engaged grip owns the next left press (click-move-click placement
// or the release of a press-drag). Do not let the same press arm the
// normal box/lasso state; the release path below will commit the grip.
if self.tabs[i].active_grip.is_some() {
self.tabs[i]
.scene
.selection
.borrow_mut()
.clear_left_selection_gesture();
return Task::none();
}
if self.tabs[i].active_cmd.is_none()
&& self.tabs[i].active_grip.is_none()
&& !self.tabs[i].selected_grips.is_empty()