summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-06-30 09:39:23 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-06-30 09:39:23 (GMT)
commit3e06221c481b73af3a3e16c362bcd8c3fd7b4269 (patch)
tree4099fb4f5343652a10d2e0b6da8842f2c0b84c0d /src/gui/itemviews
parente6c6b10bcdfe8954319506aa917e80edf7a8e6d5 (diff)
downloadQt-3e06221c481b73af3a3e16c362bcd8c3fd7b4269.zip
Qt-3e06221c481b73af3a3e16c362bcd8c3fd7b4269.tar.gz
Qt-3e06221c481b73af3a3e16c362bcd8c3fd7b4269.tar.bz2
Code simplification in treeviews
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r--src/gui/itemviews/qtreeview.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index f953a91..54f8d05 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -2462,11 +2462,9 @@ void QTreeView::rowsInserted(const QModelIndex &parent, int start, int end)
}
const int parentItem = d->viewIndex(parent);
- if (((parentItem != -1) && d->viewItems.at(parentItem).expanded && updatesEnabled())
+ if (((parentItem != -1) && d->viewItems.at(parentItem).expanded)
|| (parent == d->root)) {
d->doDelayedItemsLayout();
- } else if ((parentItem != -1) && d->viewItems.at(parentItem).expanded) {
- d->doDelayedItemsLayout();
} else if (parentItem != -1 && (d->model->rowCount(parent) == end - start + 1)) {
// the parent just went from 0 children to more. update to re-paint the decoration
d->viewItems[parentItem].hasChildren = true;