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.
This commit is contained in:
Hakan Seven committed 2026-07-16 13:14:37 +03:00
1 parent 1533c66a3e
commit 97cc647055
2 files changed
+12 -5

No files matched your search

+7 -4
View File
@@ -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<acadrust::Handle> = 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));
}
+5 -1
View File
@@ -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",