aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree-selection-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-tree-selection-model.c')
-rw-r--r--widgets/table/e-tree-selection-model.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index c7799313f4..4e1b626259 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -887,13 +887,14 @@ etsm_selected_count_recurse (ETreeSelectionModel *etsm,
etsm_selected_count_all_recurse(etsm, path, count);
return;
}
- if (!selection_node->any_children_selected)
- return;
if (selection_node->selected) {
(*count) ++;
}
+ if (!selection_node->any_children_selected)
+ return;
+
if (selection_node->children) {
ETreePath child = e_tree_model_node_get_first_child(E_TREE_MODEL(etsm->priv->model), path);
int i;
@@ -955,10 +956,8 @@ etsm_select_all (ESelectionModel *selection)
etsm->priv->root->any_children_selected = TRUE;
e_tree_selection_model_node_fill_children(etsm, root, etsm->priv->root);
- etsm->priv->root->all_children_selected_array = e_bit_array_new(etsm->priv->root->num_children);
- etsm->priv->root->any_children_selected_array = e_bit_array_new(etsm->priv->root->num_children);
- e_bit_array_select_all(etsm->priv->root->all_children_selected_array);
- e_bit_array_select_all(etsm->priv->root->any_children_selected_array);
+ etsm->priv->root->all_children_selected_array = NULL;
+ etsm->priv->root->any_children_selected_array = NULL;
if (etsm->priv->cursor_col == -1)
etsm->priv->cursor_col = 0;