aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-09 10:05:59 +0800
committerDan Winship <danw@src.gnome.org>2000-07-09 10:05:59 +0800
commit70909df376a188a6ee1dac1fb34e1e260fa42c94 (patch)
treebcf7fb25d77935ae7502c1c7481fe4f6cc085fec /widgets/table
parent0ff0d8a67ac5666d542b348fec978ffa01dc4940 (diff)
downloadgsoc2013-evolution-70909df376a188a6ee1dac1fb34e1e260fa42c94.tar.gz
gsoc2013-evolution-70909df376a188a6ee1dac1fb34e1e260fa42c94.tar.zst
gsoc2013-evolution-70909df376a188a6ee1dac1fb34e1e260fa42c94.zip
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
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-tree-model.c8
1 files changed, 4 insertions, 4 deletions
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 */