Storm Sewer: make placement click-driven so it always works

Reports showed structure placement could stall if command-line text entry
didn't register (ribbon-invoked commands, dynamic-input/focus interactions).

Make a canvas click ALWAYS place a structure, using whatever values were typed
so far (defaults for the rest) — so dropping an inlet works regardless of typed
entry. If typing works, enter invert/rim/area/C first, then click to place with
those values. Pipes are pick-first: click START then END structure; the pipe
commits on the second click with the current diameter/n.

Drop the early focus_cmd_input() return in the dispatch arms (the normal
dispatch tail already focuses the command line and records last_cmd).

15 module tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Michael FlynnandClaude Opus 4.8 committed 2026-06-09 09:06:18 -04:00
1 parent 057de504b2
commit 1199895f0e
2 files changed
+38 -80

No files matched your search

-3
View File
@@ -68,14 +68,11 @@ impl OpenCADStudio {
};
self.command_line.push_info(&cmd.prompt());
self.tabs[i].active_cmd = Some(Box::new(cmd));
// Focus the command line so the first typed value is captured.
return self.focus_cmd_input();
}
"SS_PIPE" => {
let cmd = crate::modules::storm_sewer::structures::PlacePipe::new();
self.command_line.push_info(&cmd.prompt());
self.tabs[i].active_cmd = Some(Box::new(cmd));
return self.focus_cmd_input();
}
"SS_PROFILE" => {
use crate::modules::storm_sewer::analysis as ss;