forked from 1b-agent/opencadstudio-upstream
fix(otrack): add 250ms dwell timeout before acquiring a tracking point
A tracking point was created as soon as a snap point was highlighted, so moving the mouse across the view spawned accidental tracking points. Acquisition now requires the cursor to rest near the snap point for 250ms (wall-clock) rather than a fixed number of move events. Closes #110 Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
e71ca80ed4
commit
ca8d249173
2 files changed
+33
-13
No files matched your search
+6
-2
@@ -2481,8 +2481,12 @@ impl OpenCADStudio {
|
||||
// distance can place a point along it — issue #69).
|
||||
let otrack_hit = {
|
||||
let snap_world = self.tabs[i].snap_result.map(|s| s.world);
|
||||
self.snapper
|
||||
.update_otrack_dwell(snap_world, view_proj, bounds);
|
||||
self.snapper.update_otrack_dwell(
|
||||
snap_world,
|
||||
view_proj,
|
||||
bounds,
|
||||
Instant::now(),
|
||||
);
|
||||
if self.tabs[i].snap_result.is_none() {
|
||||
let step = if self.polar_mode {
|
||||
Some(self.polar_increment_deg)
|
||||
|
||||
Reference in new issue
Block a user