forked from 1b-agent/opencadstudio-upstream
Use shared unit formatters across property and dynamic views
This commit is contained in:
1 parent
ca0ee37d26
commit
fca96b57de
10 files changed
+78
-65
No files matched your search
+6
-1
@@ -3069,7 +3069,12 @@ impl DynInputCanvas {
|
||||
|
||||
fn box_content(b: &DynBox) -> String {
|
||||
match b.role {
|
||||
DynRole::Angle => format!("{}\u{00B0}", b.value),
|
||||
// Live angle values already come from `format_angle`, which adds
|
||||
// the drawing's appropriate marker (°, g, r, DMS, or bearing).
|
||||
// A locked value is the user's raw numeric buffer and retains the
|
||||
// legacy degree marker while it is being edited.
|
||||
DynRole::Angle if b.locked => format!("{}\u{00B0}", b.value),
|
||||
DynRole::Angle => b.value.clone(),
|
||||
_ if b.label.is_empty() => b.value.clone(),
|
||||
_ => format!("{}{}", b.label, b.value),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user