From 48e35cdf4cb43d172a61ffa86e24e0c25b156680 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sat, 31 Mar 2001 20:10:30 +0000 Subject: Set orig_position properly on inserted nodes. 2001-03-31 Christopher James Lahey * e-tree-sorted.c (ets_proxy_node_inserted): Set orig_position properly on inserted nodes. svn path=/trunk/; revision=9074 --- widgets/table/e-tree-sorted.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'widgets/table/e-tree-sorted.c') diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c index b041e73952..38f92bd3e4 100644 --- a/widgets/table/e-tree-sorted.c +++ b/widgets/table/e-tree-sorted.c @@ -923,13 +923,14 @@ ets_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETr if (position != parent_path->num_children) { for (i = 0; i < parent_path->num_children; i++) { - if (parent_path->children[i]->position >= position) - parent_path->children[i]->position++; + if (parent_path->children[i]->orig_position >= position) + parent_path->children[i]->orig_position++; } } i = parent_path->num_children; path = new_path(parent_path, child); + path->orig_position = position; if (ets->priv->sort_idle_id == 0) { ets->priv->insert_count++; if (ets->priv->insert_count > ETS_INSERT_MAX) { -- cgit v1.2.3