From a5057e26b1bea8b8f532c0f2523b7bf900ef2033 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Fri, 24 Apr 2026 01:40:33 +0300 Subject: [PATCH] fix: show specific entity type name in Properties panel for all entity types Expanded entity_type_name() to cover all EntityType variants from acadrust instead of falling back to the generic "Entity" label. Co-Authored-By: Claude Sonnet 4.6 --- src/scene/properties.rs | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/src/scene/properties.rs b/src/scene/properties.rs index 81ea0ec86..4611df4f5 100644 --- a/src/scene/properties.rs +++ b/src/scene/properties.rs @@ -69,21 +69,47 @@ pub fn fallback_properties(_handle: Handle, entity: &EntityType) -> PropSection fn entity_type_name(e: &EntityType) -> &'static str { match e { + EntityType::Point(_) => "Point", EntityType::Line(_) => "Line", EntityType::Circle(_) => "Circle", EntityType::Arc(_) => "Arc", EntityType::Ellipse(_) => "Ellipse", EntityType::Spline(_) => "Spline", - EntityType::LwPolyline(_) => "LwPolyline", + EntityType::LwPolyline(_) => "Polyline", + EntityType::Polyline(_) => "Polyline", + EntityType::Polyline2D(_) => "Polyline2D", + EntityType::Polyline3D(_) => "Polyline3D", + EntityType::PolyfaceMesh(_) => "PolyfaceMesh", + EntityType::PolygonMesh(_) => "PolygonMesh", EntityType::Text(_) => "Text", EntityType::MText(_) => "MText", EntityType::Dimension(_) => "Dimension", - EntityType::Insert(_) => "Insert", - EntityType::Solid3D(_) => "Solid3D", - EntityType::Point(_) => "Point", - EntityType::Hatch(_) => "Hatch", EntityType::Leader(_) => "Leader", EntityType::MultiLeader(_) => "MultiLeader", - _ => "Entity", + EntityType::Tolerance(_) => "Tolerance", + EntityType::Insert(_) => "Block Reference", + EntityType::Block(_) => "Block", + EntityType::BlockEnd(_) => "Block End", + EntityType::Hatch(_) => "Hatch", + EntityType::Solid(_) => "Solid", + EntityType::Face3D(_) => "3D Face", + EntityType::Solid3D(_) => "3D Solid", + EntityType::Region(_) => "Region", + EntityType::Body(_) => "Body", + EntityType::Mesh(_) => "Mesh", + EntityType::Ray(_) => "Ray", + EntityType::XLine(_) => "XLine", + EntityType::MLine(_) => "MLine", + EntityType::Viewport(_) => "Viewport", + EntityType::RasterImage(_) => "Raster Image", + EntityType::Wipeout(_) => "Wipeout", + EntityType::Underlay(_) => "Underlay", + EntityType::Shape(_) => "Shape", + EntityType::Table(_) => "Table", + EntityType::AttributeDefinition(_) => "Attribute Definition", + EntityType::AttributeEntity(_) => "Attribute", + EntityType::Ole2Frame(_) => "OLE Frame", + EntityType::Seqend(_) => "Seqend", + EntityType::Unknown(_) => "Unknown", } }