Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/itemviews/qtreeview.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    675675    // since QAbstractItemView::dataChanged() will get the visualRect for the items anyway
    676676
     677
    677678    int topViewIndex = d->viewIndex(topLeft);
    678     if (topViewIndex == 0)
    679         d->defaultItemHeight = indexRowSizeHint(topLeft);
    680     bool sizeChanged = false;
     679    if (topViewIndex == 0) {
     680        int newDefaultItemHeight = indexRowSizeHint(topLeft);
     681        sizeChanged = d->defaultItemHeight != newDefaultItemHeight;
     682        d->defaultItemHeight = newDefaultItemHeight;
     683    }
     684
    681685    if (topViewIndex != -1) {
    682         if (topLeft == bottomRight) {
     686        if (topLeft) {
    683687            int oldHeight = d->itemHeight(topViewIndex);
    684688            d->invalidateHeightCache(topViewIndex);
    685             sizeChanged = (oldHeight != d->itemHeight(topViewIndex));
     689            sizeChanged |= (oldHeight != d->itemHeight(topViewIndex));
     690            if (topLeft.column() == 0)
     691                d->viewItems[topViewIndex].hasChildren = d->hasVisibleChildren(topLeft);
    686692        } else {
    687693            int bottomViewIndex = d->viewIndex(bottomRight);
     
    690696                d->invalidateHeightCache(i);
    691697                sizeChanged |= (oldHeight != d->itemHeight(i));
     698
     699
    692700            }
    693701        }