forked from 1b-agent/opencadstudio-upstream
fix(properties): preserve literal text
Separate numeric fields from names and content so only numeric property values are evaluated as expressions. Refs #809
This commit is contained in:
commit
5e62da464e
15 files changed
+107
-31
No files matched your search
@@ -19,19 +19,19 @@ fn base_props(base: &DimensionBase) -> Vec<crate::scene::model::object::Property
|
||||
crate::scene::model::object::Property {
|
||||
label: t!("Text").into_owned(),
|
||||
field: "text",
|
||||
value: crate::scene::model::object::PropValue::EditText(base.text.clone()),
|
||||
value: crate::scene::model::object::PropValue::PlainText(base.text.clone()),
|
||||
},
|
||||
crate::scene::model::object::Property {
|
||||
label: t!("User Text").into_owned(),
|
||||
field: "user_text",
|
||||
value: crate::scene::model::object::PropValue::EditText(
|
||||
value: crate::scene::model::object::PropValue::PlainText(
|
||||
base.user_text.clone().unwrap_or_default(),
|
||||
),
|
||||
},
|
||||
crate::scene::model::object::Property {
|
||||
label: t!("Style").into_owned(),
|
||||
field: "style_name",
|
||||
value: crate::scene::model::object::PropValue::EditText(base.style_name.clone()),
|
||||
value: crate::scene::model::object::PropValue::PlainText(base.style_name.clone()),
|
||||
},
|
||||
edit(t!("Text X").as_ref(), "text_x", base.text_middle_point.x),
|
||||
edit(t!("Text Y").as_ref(), "text_y", base.text_middle_point.y),
|
||||
@@ -4129,4 +4129,3 @@ mod arch_format_tests {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user