From cf5362aeab32534f5c9d8c5701b3a3062eb3c9a9 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Thu, 16 Jul 2026 13:57:44 +0300 Subject: [PATCH] feat(count): prompt COUNT for the tally mode Bare COUNT now offers [All (by type) / By layer] as buttons instead of immediately dumping the by-type tally. "All" dispatches COUNT TYPE, whose output is identical to the old bare COUNT; "By layer" dispatches COUNT LAYER. Counting a specific layer (COUNT ) stays typeable. Finishes bucket B. --- src/app/commands/inquiry.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/commands/inquiry.rs b/src/app/commands/inquiry.rs index 48a3c39d4..1ecaaee4f 100644 --- a/src/app/commands/inquiry.rs +++ b/src/app/commands/inquiry.rs @@ -875,7 +875,17 @@ impl OpenCADStudio { } // ── COUNT — entity statistics ───────────────────────────────────── - cmd if cmd == "COUNT" || cmd.starts_with("COUNT ") => { + "COUNT" => { + use crate::command::KeywordCommand; + let c = KeywordCommand::new( + "COUNT", + "COUNT tally [All (by type) / by Layer]:", + vec![("All", "TYPE", None), ("By layer", "LAYER", None)], + ); + self.command_line.push_info(&c.prompt()); + self.tabs[self.active_tab].active_cmd = Some(Box::new(c)); + } + cmd if cmd.starts_with("COUNT ") => { let filter = cmd.split_once(' ').map(|(_, r)| r.trim().to_uppercase()); let mut counts: std::collections::BTreeMap = Default::default(); for e in self.tabs[i].scene.document.entities() {