fix(otrack): clear tracking points when command ends (#64)

OTRACK acquired tracking points by dwell during a command or grip drag,
but only cleared them when OTRACK was toggled off — so the temporary
tracking-point symbols (drawn straight from the point set) lingered in
the view after the command ended.

Drop the tracking points once neither a command nor a grip drag is
active. Acquisition only happens during those, so this covers every
exit path (Esc, cancel, commit) from one place. The tracking vector is
a preview wire already cleared on cancel.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-09 23:22:34 +03:00
1 parent 3f9c29d6df
commit d62690b652
1 file changed
+10
+10
View File
@@ -60,6 +60,16 @@ impl OpenCADStudio {
self.command_line.set_step_prompt(prompt);
// Persist UI preferences whenever a toggle changes them (issue #68).
self.persist_settings_if_changed();
// OTRACK acquires tracking points only while a command or grip drag is
// running; drop them once neither is active so the temporary tracking
// points / vectors disappear when the command ends (issue #64).
let i = self.active_tab;
if self.tabs[i].active_cmd.is_none()
&& self.tabs[i].active_grip.is_none()
&& !self.snapper.tracking_points.is_empty()
{
self.snapper.clear_tracking();
}
task
}