forked from 1b-agent/opencadstudio-upstream
Capture pointer input during grip edits
This commit is contained in:
1 parent
bde9cc2715
commit
708c30831c
2 files changed
+39
-4
No files matched your search
@@ -2784,6 +2784,18 @@ 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()
|
||||
@@ -2879,6 +2891,11 @@ impl OpenCADStudio {
|
||||
));
|
||||
self.grip_hover = None;
|
||||
self.grip_popup = None;
|
||||
self.tabs[i]
|
||||
.scene
|
||||
.selection
|
||||
.borrow_mut()
|
||||
.clear_left_selection_gesture();
|
||||
|
||||
// A grip edit is not a CAD command, so explicitly seed the shared
|
||||
// dynamic-input fields for the newly engaged grip.
|
||||
@@ -2956,10 +2973,7 @@ impl OpenCADStudio {
|
||||
// click doesn't read as an in-progress drag on later moves.
|
||||
{
|
||||
let mut sel = self.tabs[i].scene.selection.borrow_mut();
|
||||
sel.left_down = false;
|
||||
sel.left_press_pos = None;
|
||||
sel.left_press_time = None;
|
||||
sel.left_dragging = false;
|
||||
sel.clear_left_selection_gesture();
|
||||
}
|
||||
let moved = grip.last_world != grip.origin_world;
|
||||
if is_click && !moved {
|
||||
|
||||
Reference in new issue
Block a user