forked from 1b-agent/opencadstudio-upstream
fix(snap): OSNAP Extension tracks only acquired endpoints
Extension snap extended every segment's line in the whole drawing, so in a larger project an extension foot was live almost everywhere and the cursor snapped to it constantly. Extension now behaves like a temporary tracking point: an endpoint must first be acquired by dwelling on it, and only then does that segment's line extend. Acquisition — and the tracking-point marker — is active whenever OTRACK is on OR the Extension snap is on, so Extension works independently of OTRACK's on/off state (and is not tied to POLAR). Both the per-segment extension and the extended-intersection candidates are gated on an acquired endpoint, and the whole scan is skipped when nothing is acquired (the common case), keeping large drawings responsive. Closes #262 Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
2bbd3cfcd2
commit
d93bcda889
2 files changed
+111
-24
No files matched your search
+1
-1
@@ -340,7 +340,7 @@ impl OpenCADStudio {
|
||||
// Shared OTRACK projection basis: the active pane's camera + rect
|
||||
// (canvas offset included), matching the grips / UCS icon above.
|
||||
let otrack_proj: Option<(glam::Mat4, glam::DVec3, iced::Rectangle)> =
|
||||
if self.snapper.otrack_enabled {
|
||||
if self.snapper.tracking_active() {
|
||||
Some(
|
||||
if let Some((vp_cam, full)) = tab.scene.viewport_edit_frame((vw, vh)) {
|
||||
(vp_cam.view_proj_rte(full), vp_cam.eye(), full)
|
||||
|
||||
Reference in new issue
Block a user