--- a/src/hbwidgets/itemviews/hbtreeview.cpp Thu May 27 13:10:59 2010 +0300
+++ b/src/hbwidgets/itemviews/hbtreeview.cpp Fri Jun 11 13:58:22 2010 +0300
@@ -178,19 +178,16 @@
if (d->isParentValid(parent)) {
if (isExpanded(parent) || parent == d->mModelIterator->rootIndex()) {
- int lastStartPoint = 0;
for (int i = start; i <= end; ++i) {
- QModelIndex newParent = d->treeModelIterator()->index(i, parent);
+ HbAbstractItemView::rowsInserted(parent, i, i);
+ // if there is expanded parent under expanding parent, handle it recursively
+ QModelIndex newParent = d->treeModelIterator()->model()->index(i, 0, parent);
int childCount = d->treeModelIterator()->childCount(newParent);
if (childCount > 0 && isExpanded(newParent)) {
- HbAbstractItemView::rowsInserted(parent, lastStartPoint, i);
- lastStartPoint = i;
rowsInserted(newParent, 0, childCount - 1);
- }
+ }
}
- HbAbstractItemView::rowsInserted(parent, lastStartPoint, end);
-
if (d->animationEnabled(true)) {
if (d->mInSetExpanded) {
d->startAppearEffect("treeviewitem", "expand", parent, start, end);