X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fctables.c;h=edeb97cc28a883e28e44e5b1cda4d2cabaa8bc41;hb=142f8f8814423f76523825f8df060e2fa9d2a2b6;hp=6b6b46a035239564d3a54c43d353a9bcf06c84f1;hpb=03384f9680feba65ee79b9680f366435a7a60442;p=pspp diff --git a/src/language/stats/ctables.c b/src/language/stats/ctables.c index 6b6b46a035..edeb97cc28 100644 --- a/src/language/stats/ctables.c +++ b/src/language/stats/ctables.c @@ -2567,12 +2567,16 @@ ctables_table_output (struct ctables *ct, struct ctables_table *t) pivot_table_set_caption ( pt, pivot_value_new_user_text (t->corner, SIZE_MAX)); - bool summary_dimension = t->summary_axis != t->slabels_axis; + bool summary_dimension = (t->summary_axis != t->slabels_axis + || (!t->slabels_visible + && t->summary_specs.n > 1)); if (summary_dimension) { struct pivot_dimension *d = pivot_dimension_create ( - pt, t->slabels_axis, N_("Summaries")); + pt, t->slabels_axis, N_("Statistics")); const struct ctables_summary_spec_set *specs = &t->summary_specs; + if (!t->slabels_visible) + d->hide_all_labels = true; for (size_t i = 0; i < specs->n; i++) pivot_category_create_leaf ( d->root, pivot_value_new_text (specs->specs[i].label)); @@ -2700,7 +2704,7 @@ ctables_table_output (struct ctables *ct, struct ctables_table *t) } } - if (a == t->slabels_axis && a == t->summary_axis) + if (!summary_dimension && a == t->slabels_axis) { levels[n_levels++] = (struct ctables_level) { .type = CTL_SUMMARY,