mirror of
https://github.com/aphrody-labs/cadcraft.git
synced 2026-10-14 03:29:06 +00:00
Squash of PR #645 by @MarekSpodBiedry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
54ea5e743a
commit
83b8a84050
3 files changed
+8
-2
No files matched your search
@@ -60,7 +60,10 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
.menu(&["Format", "Multileader Style..."])
|
||||
.alias(&["mls"])
|
||||
.params("{name, arrowSize?, textHeight?, landingGap?, dogleg?, textStyle?, annotative?, current?} → styles"),
|
||||
CommandSpec::new("ddptype", "Point Style...", run_ptype).menu(&["Format", "Point Style..."]).params("{pdmode, pdsize}"),
|
||||
CommandSpec::new("ddptype", "Point Style...", run_ptype)
|
||||
.menu(&["Format", "Point Style..."])
|
||||
.alias(&["ptype"])
|
||||
.params("{pdmode, pdsize}"),
|
||||
CommandSpec::new("rename", "Rename...", run_rename)
|
||||
.menu(&["Format", "Rename..."])
|
||||
.alias(&["ren", "-rename"])
|
||||
|
||||
@@ -26,7 +26,7 @@ pub fn route(app: &mut CadApp, id: &str, params: &Value) -> Option<Result<Value,
|
||||
let dialog = match id {
|
||||
"battman" => "battman",
|
||||
"linetype" | "lt" | "ltype" => "linetype",
|
||||
"ddptype" => "ptype",
|
||||
"ddptype" | "ptype" => "ptype",
|
||||
"style" | "st" => "textstyle",
|
||||
"tablestyle" | "ts" => "tablestyle",
|
||||
"mleaderstyle" | "mls" => "mleaderstyle",
|
||||
|
||||
@@ -29,6 +29,9 @@ fn menu_items_open_their_dialogs() {
|
||||
app.ui.dialog = None;
|
||||
app.cmdline("LT");
|
||||
assert_eq!(app.ui.dialog.as_deref(), Some("linetype"), "typed aliases open it too");
|
||||
app.ui.dialog = None;
|
||||
assert!(app.cmdline("PTYPE").is_none(), "bare PTYPE is not an error");
|
||||
assert_eq!(app.ui.dialog.as_deref(), Some("ptype"), "PTYPE opens the Point Style dialog");
|
||||
for typed in ["style", "ST"] {
|
||||
app.ui.dialog = None;
|
||||
assert!(app.cmdline(typed).is_none(), "bare {typed} is not an error");
|
||||
|
||||
Reference in new issue
Block a user