forked from 1b-agent/opencadstudio-upstream
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:
1 parent
3f9c29d6df
commit
d62690b652
1 file changed
+10
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user