From 66bf4b1d5fd92505444c65cf390a4e72fc071c5a Mon Sep 17 00:00:00 2001 From: ramox81 <184937705+ramox81@users.noreply.github.com> Date: Wed, 26 Aug 2026 14:19:24 +0300 Subject: [PATCH] Honor fixed tolerance text styles --- src/app/properties.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/app/properties.rs b/src/app/properties.rs index 68b6d3f5c..5d55c28d8 100644 --- a/src/app/properties.rs +++ b/src/app/properties.rs @@ -1355,6 +1355,13 @@ impl OpenCADStudio { .map(|entry| entry.name.clone()) .or_else(|| style.map(|entry| entry.dimtxsty.clone())) .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(); if !names .iter() @@ -1380,7 +1387,11 @@ impl OpenCADStudio { set_row_value( &mut sections, "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