feat(properties): stop offering a height the style has fixed

A text style with a non-zero height fixes the size of everything drawn in
it — the CAD that writes the file skips the height prompt for such a
style, and shows the height without letting it be changed. OCS offered
the field either way, so a drawing could be edited into disagreeing with
its own style.

The height row is now read-only when the style fixes it, for TEXT, MTEXT
and both attribute kinds. `num_prop` already draws a numeric row either
way, so the value still reads the same, just grey.

The panel builders are handed an entity, not the document it came from,
and widening that trait would touch every entity type. The lookup rides
beside the unit context instead, seeded from the same place, since it
answers the same kind of question: something the drawing settles that a
row needs in order to render itself.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-08-08 02:45:46 +03:00
commit 2ea3bca093
5 changed files with 66 additions and 4 deletions

View file

@ -93,6 +93,11 @@ impl OpenCADStudio {
crate::entities::common::UnitContext::from_header(h),
);
}
{
// Which text styles fix their own height — the height rows read it
// to decide whether they are editable.
crate::entities::common::set_fixed_text_heights(&self.tabs[i].scene.document);
}
let layer_names: Vec<String> = self.tabs[i]
.scene