From 06d0ddc393df2ab76e8851a4ef876f26a24e38ed Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Wed, 14 Oct 2026 23:59:24 +0300 Subject: [PATCH] selection: start the found count afresh for every command The count was keyed on the gathering command's address, so a command boxed where the previous one was (MOVE right after MOVE) inherited its selection and reported its first pick as a duplicate. Drop the report whenever no command is running. Co-Authored-By: Claude Opus 5.5 --- src/app/command_driver/utilities.rs | 2 +- src/app/update/mod.rs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/command_driver/utilities.rs b/src/app/command_driver/utilities.rs index 8410745ad..5be26f15d 100644 --- a/src/app/command_driver/utilities.rs +++ b/src/app/command_driver/utilities.rs @@ -574,7 +574,7 @@ impl OpenCADStudio { StepInput::SelectionComplete(kept) } -/// What one selection step picked, as the reference words it: `N found` + /// What one selection step picked, as the reference words it: `N found` /// for the first step, `N found, M total`, `N found (D duplicate), M /// total` when some were chosen already, `N found, R removed, M total` in /// remove mode. Returns the command's key while it gathers. diff --git a/src/app/update/mod.rs b/src/app/update/mod.rs index b8ace3c10..bc6e534d7 100644 --- a/src/app/update/mod.rs +++ b/src/app/update/mod.rs @@ -613,6 +613,12 @@ impl OpenCADStudio { // open, template new); announce it on the same boundary (API v9). #[cfg(not(target_arch = "wasm32"))] self.notify_plugins_document_opened(); + // The `N found, M total` count belongs to the command that gathered + // it; the next command, even one boxed at the same address, starts + // from nothing. + if self.tabs[self.active_tab].active_cmd.is_none() { + self.selection_report = None; + } // 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). A grip