Only recurse depth wise in Tree::_count_selected_items
This commit is contained in:
parent
b4e2a24c1f
commit
43038bbfcb
1 changed files with 2 additions and 6 deletions
|
@ -2587,12 +2587,8 @@ int Tree::_count_selected_items(TreeItem *p_from) const {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_from->get_first_child()) {
|
for (TreeItem *c = p_from->get_first_child(); c; c = c->get_next()) {
|
||||||
count += _count_selected_items(p_from->get_first_child());
|
count += _count_selected_items(c);
|
||||||
}
|
|
||||||
|
|
||||||
if (p_from->get_next()) {
|
|
||||||
count += _count_selected_items(p_from->get_next());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
|
|
Loading…
Reference in a new issue