diff --git a/Cargo.lock b/Cargo.lock index 246bf0d0f..3987a12c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,7 +71,7 @@ checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" [[package]] name = "acadrust" version = "0.4.0" -source = "git+https://github.com/HakanSeven12/acadrust?branch=main#a46cb8b3a2e5523bbd28e5afa0f8efb7ae291c50" +source = "git+https://github.com/HakanSeven12/acadrust?branch=main#ef0e2310c3b2449cf28f8da02c22b831cdc4a50b" dependencies = [ "ahash 0.8.12", "anyhow", diff --git a/src/entities/solid3d.rs b/src/entities/solid3d.rs index d696f3149..059340e7d 100644 --- a/src/entities/solid3d.rs +++ b/src/entities/solid3d.rs @@ -107,16 +107,22 @@ impl Grippable for Solid3D { impl PropertyEditable for Solid3D { fn geometry_properties(&self, _text_style_names: &[String]) -> Vec { - let history = match self.history_handle { - Some(h) if !h.is_null() => format!("{:X}", h.value()), - _ => "None".to_string(), + let has_history = matches!(self.history_handle, Some(h) if !h.is_null()); + let history = if has_history { + format!("{:X}", self.history_handle.unwrap().value()) + } else { + "None".to_string() }; vec![ PropSection { title: "Solid History".into(), props: vec![ ro("History", "s3d_history", history), - ro("Show History", "s3d_show_history", String::new()), + ro( + "Show History", + "s3d_show_history", + if has_history { "Yes" } else { "No" }, + ), ], }, PropSection { @@ -200,11 +206,21 @@ impl Grippable for Body { impl PropertyEditable for Body { fn geometry_properties(&self, _text_style_names: &[String]) -> Vec { + let has_history = matches!(self.history_handle, Some(h) if !h.is_null()); + let history = if has_history { + format!("{:X}", self.history_handle.unwrap().value()) + } else { + "None".to_string() + }; vec![PropSection { title: "Solid History".into(), props: vec![ - ro("History", "bdy_history", String::new()), - ro("Show History", "bdy_show_history", String::new()), + ro("History", "bdy_history", history), + ro( + "Show History", + "bdy_show_history", + if has_history { "Yes" } else { "No" }, + ), ], }] } diff --git a/src/entities/viewport.rs b/src/entities/viewport.rs index 3ca8bf72e..a0873ba1d 100644 --- a/src/entities/viewport.rs +++ b/src/entities/viewport.rs @@ -129,7 +129,11 @@ fn properties(vp: &Viewport) -> Vec { value: vp.status.is_on, }, }, - ro("Clipped", "vp_clipped", String::new()), + ro( + "Clipped", + "vp_clipped", + if vp.clip_boundary_handle.is_null() { "No" } else { "Yes" }, + ), Property { label: "Display locked".into(), field: "vp_locked",