summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-03-23 23:11:53 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-03-23 23:11:53 (GMT)
commit838e4cc024f4589322d5279acd96e3ca4d00e1f5 (patch)
tree8a5d4e50ac67e07d6116a504b39de8768ed5540e /src/gui/itemviews
parent6801a97671f64ef30ab312b38d16abc964ad6ac5 (diff)
parente3999a4f91194b7508dbd1d3e6f595f729022ed7 (diff)
downloadQt-838e4cc024f4589322d5279acd96e3ca4d00e1f5.zip
Qt-838e4cc024f4589322d5279acd96e3ca4d00e1f5.tar.gz
Qt-838e4cc024f4589322d5279acd96e3ca4d00e1f5.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts: tests/auto/declarative/qdeclarativedom/data/importlib/sublib/qmldir
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r--src/gui/itemviews/qtreeview.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index 61ad79d..4636c50 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -674,15 +674,19 @@ void QTreeView::dataChanged(const QModelIndex &topLeft, const QModelIndex &botto
// refresh the height cache here; we don't really lose anything by getting the size hint,
// since QAbstractItemView::dataChanged() will get the visualRect for the items anyway
- int topViewIndex = d->viewIndex(topLeft);
- if (topViewIndex == 0)
- d->defaultItemHeight = indexRowSizeHint(topLeft);
bool sizeChanged = false;
+ int topViewIndex = d->viewIndex(topLeft);
+ if (topViewIndex == 0) {
+ int newDefaultItemHeight = indexRowSizeHint(topLeft);
+ sizeChanged = d->defaultItemHeight != newDefaultItemHeight;
+ d->defaultItemHeight = newDefaultItemHeight;
+ }
+
if (topViewIndex != -1) {
if (topLeft.row() == bottomRight.row()) {
int oldHeight = d->itemHeight(topViewIndex);
d->invalidateHeightCache(topViewIndex);
- sizeChanged = (oldHeight != d->itemHeight(topViewIndex));
+ sizeChanged |= (oldHeight != d->itemHeight(topViewIndex));
if (topLeft.column() == 0)
d->viewItems[topViewIndex].hasChildren = d->hasVisibleChildren(topLeft);
} else {