diff options
author | Benjamin Otte <otte@redhat.com> | 2011-11-19 13:10:05 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-11-21 22:33:45 +0100 |
commit | ba7a0a01887d2558ee7a2152834bd33a1f901947 (patch) | |
tree | 4aa5de5935c5993c5ddb8408e919511634cef461 /gtk/gtkrbtree.c | |
parent | 7b2d414222374d1383be543271d7cc9597677bed (diff) | |
download | gtk+-ba7a0a01887d2558ee7a2152834bd33a1f901947.tar.gz |
rbtree: Use gtk_rbnode_adjust() more.
Make _gtk_rbtree_node_set_height() use it.
Diffstat (limited to 'gtk/gtkrbtree.c')
-rw-r--r-- | gtk/gtkrbtree.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/gtk/gtkrbtree.c b/gtk/gtkrbtree.c index 9f281be200..b62a0f3dc1 100644 --- a/gtk/gtkrbtree.c +++ b/gtk/gtkrbtree.c @@ -603,22 +603,12 @@ _gtk_rbtree_node_set_height (GtkRBTree *tree, gint height) { gint diff = height - GTK_RBNODE_GET_HEIGHT (node); - GtkRBNode *tmp_node = node; - GtkRBTree *tmp_tree = tree; if (diff == 0) return; - while (tmp_tree && tmp_node && tmp_node != tmp_tree->nil) - { - tmp_node->offset += diff; - tmp_node = tmp_node->parent; - if (tmp_node == tmp_tree->nil) - { - tmp_node = tmp_tree->parent_node; - tmp_tree = tmp_tree->parent_tree; - } - } + gtk_rbnode_adjust (tree, node, 0, 0, diff); + #ifdef G_ENABLE_DEBUG if (gtk_get_debug_flags () & GTK_DEBUG_TREE) _gtk_rbtree_test (G_STRLOC, tree); |