diff --git a/crates/engine/src/cmd/props.rs b/crates/engine/src/cmd/props.rs index 1c4ecd2..60bf05c 100644 --- a/crates/engine/src/cmd/props.rs +++ b/crates/engine/src/cmd/props.rs @@ -60,7 +60,10 @@ pub fn specs() -> Vec { .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"]) diff --git a/crates/ui-egui/src/managers.rs b/crates/ui-egui/src/managers.rs index ed23696..35242a4 100644 --- a/crates/ui-egui/src/managers.rs +++ b/crates/ui-egui/src/managers.rs @@ -26,7 +26,7 @@ pub fn route(app: &mut CadApp, id: &str, params: &Value) -> Option "battman", "linetype" | "lt" | "ltype" => "linetype", - "ddptype" => "ptype", + "ddptype" | "ptype" => "ptype", "style" | "st" => "textstyle", "tablestyle" | "ts" => "tablestyle", "mleaderstyle" | "mls" => "mleaderstyle", diff --git a/crates/ui-egui/tests/style_dialogs.rs b/crates/ui-egui/tests/style_dialogs.rs index f35776b..2674565 100644 --- a/crates/ui-egui/tests/style_dialogs.rs +++ b/crates/ui-egui/tests/style_dialogs.rs @@ -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");