summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qtreeview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemviews/qtreeview.cpp')
-rw-r--r--src/gui/itemviews/qtreeview.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index 210534e..d597f5c 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -2908,15 +2908,15 @@ void QTreeViewPrivate::expand(int item, bool emitSignal)
layout(item);
q->setState(oldState);
+ if (model->canFetchMore(index))
+ model->fetchMore(index);
if (emitSignal) {
emit q->expanded(index);
#ifndef QT_NO_ANIMATION
- if (animationsEnabled)
+ if (animationsEnabled && model->hasChildren(index))
beginAnimatedOperation();
#endif //QT_NO_ANIMATION
}
- if (model->canFetchMore(index))
- model->fetchMore(index);
}
void QTreeViewPrivate::collapse(int item, bool emitSignal)