- if (a == PIVOT_AXIS_ROW)
- {
- size_t n = nest->n_areas[at];
- if (n > 1)
- {
- nest->areas[at][n - 2] = nest->areas[at][n - 1];
- nest->n_areas[at]--;
- }
- }
+ drop_inner = a == t->clabels_from_axis;
+ n_drop = a != t->clabels_from_axis && a != PIVOT_AXIS_LAYER;
+ }
+ break;
+
+ case CTAT_LAYERROW:
+ n_drop = a == PIVOT_AXIS_ROW && t->label_axis[PIVOT_AXIS_ROW] == PIVOT_AXIS_COLUMN;
+ break;
+
+ case CTAT_LAYERCOL:
+ n_drop = a == PIVOT_AXIS_COLUMN && t->label_axis[PIVOT_AXIS_COLUMN] == PIVOT_AXIS_ROW;
+ break;
+
+ case CTAT_ROW:
+ if (a == PIVOT_AXIS_COLUMN && t->label_axis[PIVOT_AXIS_ROW] == PIVOT_AXIS_COLUMN)
+ n_drop = 0;
+ else if (a == PIVOT_AXIS_COLUMN && t->label_axis[PIVOT_AXIS_COLUMN] == PIVOT_AXIS_ROW)
+ {
+ drop_inner = true;