From: Ben Pfaff Date: Fri, 9 Jan 2026 18:16:54 +0000 (-0800) Subject: work X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c1419725964858cf15db8320927b0e41e733db6;p=pspp work --- 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() }