From 97cc6470552e263d576f918f1df50ea1a22a0202 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Thu, 16 Jul 2026 13:14:37 +0300 Subject: [PATCH] fix(annoscale): make the OBJECTSCALE dialog reachable The Annotation Object Scale dialog (advertised in v0.8.2) was dead code: bare OBJECTSCALE was caught by the immediate "mark selection annotative" arm, so the `"OBJECTSCALE" =>` dialog arm below it never ran and nothing else opened the dialog. Move the quick mark to an explicit `OBJECTSCALE ADD` keyword (what the ribbon "Add Scale" button now sends, dispatched whole so it doesn't collide), leaving bare OBJECTSCALE to open the dialog. --- src/app/commands/display.rs | 11 +++++++---- src/modules/annotate/mod.rs | 6 +++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/app/commands/display.rs b/src/app/commands/display.rs index 3bac97cfb..a3d436799 100644 --- a/src/app/commands/display.rs +++ b/src/app/commands/display.rs @@ -554,10 +554,11 @@ impl OpenCADStudio { // still being built. Acknowledge them with an honest status so the // button responds instead of reporting an unknown command; each is // replaced by its real handler as the feature lands. - // OBJECTSCALE — mark the selected objects annotative by attaching the - // AcAnnotativeData XData record the tessellator already honours, so - // they scale with the current annotation scale. - cmd if cmd == "OBJECTSCALE" || cmd.starts_with("OBJECTSCALE ") => { + // OBJECTSCALE ADD — the ribbon "Add Scale" quick action: mark the + // selected objects annotative by attaching the AcAnnotativeData XData + // record the tessellator already honours, so they scale with the + // current annotation scale. Bare OBJECTSCALE opens the dialog below. + "OBJECTSCALE ADD" => { use acadrust::xdata::{ExtendedDataRecord, XDataValue}; let handles: Vec = self.tabs[i] .scene @@ -819,6 +820,8 @@ impl OpenCADStudio { // OBJECTSCALE — open the Annotation Object Scale dialog for the // selected object (add / remove its per-object scale representations). + // Reachable now that the immediate "add current scale" quick action + // moved to the explicit `OBJECTSCALE ADD` keyword above. "OBJECTSCALE" => { return Some(Task::done(Message::AnnoObjectScaleOpen)); } diff --git a/src/modules/annotate/mod.rs b/src/modules/annotate/mod.rs index 2abe8f953..cb6d65f12 100644 --- a/src/modules/annotate/mod.rs +++ b/src/modules/annotate/mod.rs @@ -207,7 +207,11 @@ impl CadModule for AnnotateModule { icon: crate::modules::IconKind::Svg(include_bytes!( "../../../assets/icons/add_scale.svg" )), - event: crate::modules::ModuleEvent::Command("OBJECTSCALE".to_string()), + // The quick "mark annotative at the current scale" + // action; bare OBJECTSCALE opens the manage dialog. + event: crate::modules::ModuleEvent::Command( + "OBJECTSCALE ADD".to_string(), + ), }), RibbonItem::Tool(crate::modules::ToolDef { id: "SCALELISTEDIT",