From 70909df376a188a6ee1dac1fb34e1e260fa42c94 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sun, 9 Jul 2000 02:05:59 +0000 Subject: When inserting a root node, only call e_table_model_row_inserted if * e-tree-model.c (e_tree_model_node_insert): When inserting a root node, only call e_table_model_row_inserted if root_visible. (e_tree_model_node_remove): Call e_table_model_row_deleted before removing the row from the row_array, because the chain of signal handlers will sometimes need that info. svn path=/trunk/; revision=3994 --- widgets/table/e-tree-model.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'widgets/table') diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c index e8685a8dc8..dba9c27deb 100644 --- a/widgets/table/e-tree-model.c +++ b/widgets/table/e-tree-model.c @@ -613,11 +613,11 @@ e_tree_model_node_insert (ETreeModel *tree_model, } else { tree_model->root = g_node_new (node); - if (tree_model->root_visible) + if (tree_model->root_visible) { tree_model->row_array = g_array_insert_val (tree_model->row_array, 0, tree_model->root); + e_table_model_row_inserted (E_TABLE_MODEL (tree_model), 0); + } new_path = tree_model->root; - - e_table_model_row_inserted (E_TABLE_MODEL (tree_model), 0); } return new_path; @@ -654,8 +654,8 @@ e_tree_model_node_remove (ETreeModel *etree, ETreePath *path) if (parent) { if (e_tree_model_node_is_visible (etree, path)) { int row = e_tree_model_row_of_node (etree, path); - etree->row_array = g_array_remove_index (etree->row_array, row); e_table_model_row_deleted (E_TABLE_MODEL (etree), row); + etree->row_array = g_array_remove_index (etree->row_array, row); /* we need to iterate back up to the root, incrementing the number of visible descendents */ -- cgit