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:
parent
1533c66a3e
commit
97cc647055
2 changed files with 12 additions and 5 deletions
|
|
@ -554,10 +554,11 @@ impl OpenCADStudio {
|
||||||
// still being built. Acknowledge them with an honest status so the
|
// still being built. Acknowledge them with an honest status so the
|
||||||
// button responds instead of reporting an unknown command; each is
|
// button responds instead of reporting an unknown command; each is
|
||||||
// replaced by its real handler as the feature lands.
|
// replaced by its real handler as the feature lands.
|
||||||
// OBJECTSCALE — mark the selected objects annotative by attaching the
|
// OBJECTSCALE ADD — the ribbon "Add Scale" quick action: mark the
|
||||||
// AcAnnotativeData XData record the tessellator already honours, so
|
// selected objects annotative by attaching the AcAnnotativeData XData
|
||||||
// they scale with the current annotation scale.
|
// record the tessellator already honours, so they scale with the
|
||||||
cmd if cmd == "OBJECTSCALE" || cmd.starts_with("OBJECTSCALE ") => {
|
// current annotation scale. Bare OBJECTSCALE opens the dialog below.
|
||||||
|
"OBJECTSCALE ADD" => {
|
||||||
use acadrust::xdata::{ExtendedDataRecord, XDataValue};
|
use acadrust::xdata::{ExtendedDataRecord, XDataValue};
|
||||||
let handles: Vec<acadrust::Handle> = self.tabs[i]
|
let handles: Vec<acadrust::Handle> = self.tabs[i]
|
||||||
.scene
|
.scene
|
||||||
|
|
@ -819,6 +820,8 @@ impl OpenCADStudio {
|
||||||
|
|
||||||
// OBJECTSCALE — open the Annotation Object Scale dialog for the
|
// OBJECTSCALE — open the Annotation Object Scale dialog for the
|
||||||
// selected object (add / remove its per-object scale representations).
|
// 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" => {
|
"OBJECTSCALE" => {
|
||||||
return Some(Task::done(Message::AnnoObjectScaleOpen));
|
return Some(Task::done(Message::AnnoObjectScaleOpen));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,11 @@ impl CadModule for AnnotateModule {
|
||||||
icon: crate::modules::IconKind::Svg(include_bytes!(
|
icon: crate::modules::IconKind::Svg(include_bytes!(
|
||||||
"../../../assets/icons/add_scale.svg"
|
"../../../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 {
|
RibbonItem::Tool(crate::modules::ToolDef {
|
||||||
id: "SCALELISTEDIT",
|
id: "SCALELISTEDIT",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue