diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-24 15:44:29 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-24 15:52:21 (GMT) |
commit | 346887e731df4143699ce0c2310ded4fec849d30 (patch) | |
tree | 5d56093ddf83401b47ca65c6808997115507a61e /src/gui/itemviews | |
parent | bd73818849b181ac29109ed580a60e99a38bf63d (diff) | |
download | Qt-346887e731df4143699ce0c2310ded4fec849d30.zip Qt-346887e731df4143699ce0c2310ded4fec849d30.tar.gz Qt-346887e731df4143699ce0c2310ded4fec849d30.tar.bz2 |
Fix QTreeWidgetItem::setChildIndicatorPolicy not updating.
The problem is that the ChildIndicatorPolicy change the hasChildren
in the model. But this is cached in the QTreeView layout.
We must do a relayout to clear the cache.
Reviewed-by: Thierry
Task-number: QTBUG-3071
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r-- | src/gui/itemviews/qtreewidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp index c133ae4..948ca79 100644 --- a/src/gui/itemviews/qtreewidget.cpp +++ b/src/gui/itemviews/qtreewidget.cpp @@ -1580,7 +1580,7 @@ void QTreeWidgetItem::setChildIndicatorPolicy(QTreeWidgetItem::ChildIndicatorPol if (!view) return; - view->viewport()->update( view->d_func()->itemDecorationRect(view->d_func()->index(this))); + view->scheduleDelayedItemsLayout(); } /*! |