This allows the new assertions in clone_category() to pass.
if (pivot_category_is_leaf (old))
{
+ assert (new->data_index < new_dimension->n_leaves);
new->dimension->data_leaves[new->data_index] = new;
+
+ assert (new->presentation_index < new_dimension->n_leaves);
new->dimension->presentation_leaves[new->presentation_index] = new;
}
/* Now drop unnamed 1-category groups and add parent pointers. */
for (size_t j = 0; j < n_cats; j++)
add_parents (cats[j], d->root, j);
+ for (size_t j = 0; j < d->n_leaves; j++)
+ {
+ d->data_leaves[j]->data_index = j;
+ d->presentation_leaves[j]->presentation_index = j;
+ }
d->root->subs = cats;
d->root->n_subs = n_cats;