forked from 1b-agent/opencadstudio-upstream
Honor fixed tolerance text styles
This commit is contained in:
1 parent
d039bcd4f9
commit
66bf4b1d5f
1 file changed
+12
-1
+12
-1
@@ -1355,6 +1355,13 @@ impl OpenCADStudio {
|
|||||||
.map(|entry| entry.name.clone())
|
.map(|entry| entry.name.clone())
|
||||||
.or_else(|| style.map(|entry| entry.dimtxsty.clone()))
|
.or_else(|| style.map(|entry| entry.dimtxsty.clone()))
|
||||||
.unwrap_or_else(|| "Standard".to_string());
|
.unwrap_or_else(|| "Standard".to_string());
|
||||||
|
let text_height_editable = doc
|
||||||
|
.text_styles
|
||||||
|
.iter()
|
||||||
|
.find(|entry| {
|
||||||
|
entry.name.eq_ignore_ascii_case(&text_style_name)
|
||||||
|
})
|
||||||
|
.is_none_or(|entry| !entry.has_fixed_height());
|
||||||
let mut names = text_style_names.clone();
|
let mut names = text_style_names.clone();
|
||||||
if !names
|
if !names
|
||||||
.iter()
|
.iter()
|
||||||
@@ -1380,7 +1387,11 @@ impl OpenCADStudio {
|
|||||||
set_row_value(
|
set_row_value(
|
||||||
&mut sections,
|
&mut sections,
|
||||||
"tol_text_height",
|
"tol_text_height",
|
||||||
PropValue::EditText(format!("{height:.4}")),
|
if text_height_editable {
|
||||||
|
PropValue::EditText(format!("{height:.4}"))
|
||||||
|
} else {
|
||||||
|
PropValue::ReadOnly(format!("{height:.4}"))
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// MultiLeader: max points + segment-angle constraints
|
// MultiLeader: max points + segment-angle constraints
|
||||||
|
|||||||
Reference in new issue
Block a user