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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index 30cbc5aa90..e376352f19 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -142,7 +142,7 @@ etsm_row_of_node(ETreeSelectionModel *etsm, ETreePath path)
if (path)
return e_tree_table_adapter_row_of_node(etsm->priv->etta, path);
else
- return 0;
+ return -1;
}
static int
@@ -389,8 +389,12 @@ etsm_sorted_pre_change (ETreeModel *etm, ETreeSelectionModel *etsm)
static void
etsm_sorted_node_changed (ETreeModel *etm, ETreePath node, ETreeSelectionModel *etsm)
{
+ int cursor_row = etsm_cursor_row_real (etsm);
e_selection_model_selection_changed(E_SELECTION_MODEL(etsm));
- e_selection_model_cursor_changed(E_SELECTION_MODEL(etsm), etsm_cursor_row_real(etsm), etsm->priv->cursor_col);
+ if (cursor_row != -1)
+ e_selection_model_cursor_changed(E_SELECTION_MODEL(etsm), cursor_row, etsm->priv->cursor_col);
+ else
+ e_selection_model_cursor_changed(E_SELECTION_MODEL(etsm), -1, -1);
}
static void