forked from 1b-agent/opencadstudio-upstream
feat(commands): step the rest of the keyword/value commands
Convert the remaining bucket-B commands to prompt step by step instead of requiring arguments or printing usage: - KeywordCommand (buttons): VIEW, LINETYPE, SCALELISTEDIT, UCSICON, VSCURRENT. - ValuePromptCommand (one value): LAYDEL (layer), ATTSYNC (block). - TwoValuePromptCommand (new; two values): LAYMRG (source + target), SETVAR (variable + value, blank second reads). Each bare form now starts the stepped front-end and delegates to the existing inline handler; the argument form is kept and is the dispatch target. The direct visual-style shortcuts (HIDDENLINE / XRAY / …) and UCSICON's argument form are untouched. COUNT is intentionally left alone: bare COUNT already reports the tally (a useful inquiry action, not a usage line), so prompting would only add friction.
This commit is contained in:
1 parent
4fa6c49445
commit
4c3509fa51
7 files changed
+186
-16
No files matched your search
@@ -98,10 +98,26 @@ impl OpenCADStudio {
|
||||
// chosen style is reported so the mapping is explicit. (`SOLID` is
|
||||
// intentionally NOT a visual-style verb — it is the 2D filled-polygon
|
||||
// draw command; the shaded ribbon button drives `SetWireframe`.)
|
||||
cmd if cmd == "VS"
|
||||
|| cmd == "VSCURRENT"
|
||||
|| cmd == "SHADEMODE"
|
||||
|| cmd == "HIDDENLINE"
|
||||
"VS" | "VSCURRENT" | "SHADEMODE" => {
|
||||
use crate::command::KeywordCommand;
|
||||
let c = KeywordCommand::new(
|
||||
"VSCURRENT",
|
||||
"VSCURRENT visual style [Shaded / Wireframe / Hidden / Realistic / Conceptual / X-ray]:",
|
||||
vec![
|
||||
("Shaded", "SHADED", None),
|
||||
("Wireframe", "WIREFRAME", None),
|
||||
("Hidden", "HIDDEN", None),
|
||||
("Realistic", "REALISTIC", None),
|
||||
("Conceptual", "CONCEPTUAL", None),
|
||||
("X-Ray", "XRAY", None),
|
||||
],
|
||||
);
|
||||
self.command_line.push_info(&c.prompt());
|
||||
self.tabs[i].active_cmd = Some(Box::new(c));
|
||||
}
|
||||
// The named visual-style shortcuts still switch directly, and the
|
||||
// `<name> <style>` argument form (also what the picker dispatches).
|
||||
cmd if cmd == "HIDDENLINE"
|
||||
|| cmd == "XRAY"
|
||||
|| cmd == "REALISTIC"
|
||||
|| cmd == "CONCEPTUAL"
|
||||
|
||||
Reference in new issue
Block a user