From 40effd4a8abe04ffb7731212e72e187ef3a4f67d Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sun, 15 Oct 2000 23:46:23 +0000 Subject: get the next child before traversing/calling func. 2000-10-15 Chris Toshok * e-tree-model.c (e_tree_model_node_traverse): get the next child before traversing/calling func. svn path=/trunk/; revision=5937 --- widgets/table/e-tree-model.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c index 508fe1d7c5..a508584a85 100644 --- a/widgets/table/e-tree-model.c +++ b/widgets/table/e-tree-model.c @@ -142,12 +142,15 @@ e_tree_path_unlink (ETreePath *path) void e_tree_model_node_traverse (ETreeModel *model, ETreePath *path, ETreePathFunc func, gpointer data) { - ETreePath *child; + ETreePath *child = path->first_child; - for (child = path->first_child; child; child = child->next_sibling) { + while (child) { + ETreePath *next_child = child->next_sibling; e_tree_model_node_traverse (model, child, func, data); if (func (model, child, data) == TRUE) return; + + child = next_child; } } -- cgit