fix(annotate): align annotation ribbon workflows

This commit is contained in:
ramox81 committed 2026-09-14 11:55:08 +03:00
1 parent fc1788df65
commit 6505b27818
26 files changed
+1921 -345

No files matched your search

+22 -2
View File
@@ -6,7 +6,7 @@ use cadkernel::geom2d::{
};
use crate::command::{
CadCommand, CmdResult, DimensionAssociationInput, InputKind, WorkingPlane,
CadCommand, CmdOption, CmdResult, DimensionAssociationInput, InputKind, WorkingPlane,
};
use crate::modules::{IconKind, ModuleEvent, ToolDef};
use crate::scene::model::wire_model::WireModel;
@@ -224,11 +224,31 @@ impl CadCommand for LinearDimensionCommand {
fn input_kind(&self) -> InputKind {
if self.awaiting_text {
InputKind::FreeText
} else {
} else if self.awaiting_angle || self.awaiting_rotation {
InputKind::SingleToken
} else {
InputKind::Point
}
}
fn options(&self) -> Vec<CmdOption> {
if !matches!(self.step, Step::DimensionLine { .. })
|| self.awaiting_text
|| self.awaiting_angle
|| self.awaiting_rotation
{
return Vec::new();
}
vec![
CmdOption::new("MText", "MTEXT"),
CmdOption::new("Text", "TEXT"),
CmdOption::new("Angle", "ANGLE"),
CmdOption::new("Horizontal", "HORIZONTAL"),
CmdOption::new("Vertical", "VERTICAL"),
CmdOption::new("Rotated", "ROTATED"),
]
}
fn point_step_accepts_keywords(&self) -> bool {
// While typing the override text or angle, route input as a value, not
// a point pick / keyword.