forked from 1b-agent/opencadstudio-upstream
feat(properties): show Thickness in the General group
Thickness (DXF 39) is a General-group property in the palette, but it is stored per-entity, so it was previously shown (inconsistently) only in the Geometry section of a few entities. Surface it in General for every entity type that carries an extrusion thickness (arc, circle, line, lwpolyline, point, polyface mesh, 2D polyline, shape, 2D solid, text) via entity_thickness / set_entity_thickness, routed through apply_common_prop. Removes the now-duplicate Thickness rows (and dead apply arms) from the arc/circle/shape/solid Geometry sections so it is never shown twice. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
ab0a4f790c
commit
726984e3a5
6 files changed
+64
-17
No files matched your search
Vendored
+21
-9
@@ -23,7 +23,7 @@ pub fn general_section(entity: &EntityType) -> PropSection {
|
||||
})
|
||||
.unwrap_or_default();
|
||||
|
||||
PropSection {
|
||||
let mut section = PropSection {
|
||||
title: "General".into(),
|
||||
props: vec![
|
||||
Property {
|
||||
@@ -78,16 +78,28 @@ pub fn general_section(entity: &EntityType) -> PropSection {
|
||||
field: "hyperlink",
|
||||
value: PropValue::ReadOnly(hyperlink),
|
||||
},
|
||||
Property {
|
||||
label: "Invisible".into(),
|
||||
field: "invisible",
|
||||
value: PropValue::BoolToggle {
|
||||
field: "invisible",
|
||||
value: common.invisible,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// Thickness (DXF 39) is a General-group property, but only the entity
|
||||
// types that carry an extrusion thickness expose it (line, circle, arc,
|
||||
// polyline, text, 2D solid, …). Show it right after Hyperlink for those.
|
||||
if let Some(t) = crate::scene::view::dispatch::entity_thickness(entity) {
|
||||
section
|
||||
.props
|
||||
.push(crate::entities::common::edit_prop("Thickness", "thickness", t));
|
||||
}
|
||||
|
||||
section.props.push(Property {
|
||||
label: "Invisible".into(),
|
||||
field: "invisible",
|
||||
value: PropValue::BoolToggle {
|
||||
field: "invisible",
|
||||
value: common.invisible,
|
||||
},
|
||||
});
|
||||
|
||||
section
|
||||
}
|
||||
|
||||
/// The "3D Visualization" group (Material + Shadow display), common to every
|
||||
|
||||
Reference in new issue
Block a user