From 8c1419725964858cf15db8320927b0e41e733db6 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 9 Jan 2026 10:16:54 -0800 Subject: [PATCH] work --- rust/pspp/src/output/pivot/output.rs | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/rust/pspp/src/output/pivot/output.rs b/rust/pspp/src/output/pivot/output.rs index 9be29f93c2..e6051376ff 100644 --- a/rust/pspp/src/output/pivot/output.rs +++ b/rust/pspp/src/output/pivot/output.rs @@ -306,19 +306,17 @@ impl PivotTable { .rev() .filter(|(dimension, _)| !dimension.is_empty()) .map(|(dimension, &layer_index)| { - // Append `: ` to the name of the dimension, preserving all the styling. - let name = dimension.root.name(); - let text = format!("{}: ", name.display(self).without_suffixes()); - let name = Value::new_user_text(text).with_styling(name.styling.clone()); - - self.create_aux_table( - Area::Layers, - Axis2::X, - [ - Box::new(name), - dimension.nth_leaf(layer_index).unwrap().name.clone(), - ], - ) + let value = dimension.nth_leaf(layer_index).unwrap().name.clone(); + if dimension.root.show_label { + // Append `: ` to the name of the dimension, preserving all the styling. + let name = dimension.root.name(); + let text = format!("{}: ", name.display(self).without_suffixes()); + let name = Value::new_user_text(text).with_styling(name.styling.clone()); + + self.create_aux_table(Area::Layers, Axis2::X, [Box::new(name), value]) + } else { + self.create_aux_table(Area::Layers, Axis2::X, [value]) + } }) .collect() } -- 2.30.2