diff options
-rw-r--r-- | widgets/e-table/ChangeLog | 8 | ||||
-rw-r--r-- | widgets/e-table/e-tree-model.c | 8 | ||||
-rw-r--r-- | widgets/table/e-tree-model.c | 8 |
3 files changed, 16 insertions, 8 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog index 1b1aa42ab4..75c71f99d1 100644 --- a/widgets/e-table/ChangeLog +++ b/widgets/e-table/ChangeLog @@ -1,3 +1,11 @@ +2000-07-08 Dan Winship <danw@helixcode.com> + + * 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. + 2000-07-08 Christopher James Lahey <clahey@helixcode.com> * e-table-item.c (eti_event): Don't call e_cell_event if we're not diff --git a/widgets/e-table/e-tree-model.c b/widgets/e-table/e-tree-model.c index e8685a8dc8..dba9c27deb 100644 --- a/widgets/e-table/e-tree-model.c +++ b/widgets/e-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 */ 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 */ |