From 0397658b81ce371047d9ce6979aa37d8112f1a2c Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 14 Feb 2012 18:04:47 +0100 Subject: Details view: Fix indicator-branches Up to now no indicator-branches have been drawn when showing a tree. The patch fixes this so that that the style-dependent branches are drawn. The main part of the patch is the implementation of KItemListView::updateSiblingsInformation(). Most of the other changes are related due to an internal renaming of the expansionsLevel-role to expandedParentsCount and some related cleanups. BUG: 290276 FIXED-IN: 4.8.1 --- src/kitemviews/kfileitemlistview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/kitemviews/kfileitemlistview.cpp') diff --git a/src/kitemviews/kfileitemlistview.cpp b/src/kitemviews/kfileitemlistview.cpp index f8a58ae51..03f379837 100644 --- a/src/kitemviews/kfileitemlistview.cpp +++ b/src/kitemviews/kfileitemlistview.cpp @@ -515,8 +515,8 @@ QSizeF KFileItemListView::visibleRoleSizeHint(int index, const QByteArray& role) if (role == "name") { // Increase the width by the expansion-toggle and the current expansion level - const int expansionLevel = values.value("expansionLevel", 0).toInt(); - width += option.padding + expansionLevel * itemSize().height() + KIconLoader::SizeSmall; + const int expandedParentsCount = values.value("expandedParentsCount", 0).toInt(); + width += option.padding + expandedParentsCount * itemSize().height() + KIconLoader::SizeSmall; // Increase the width by the required space for the icon width += option.padding * 2 + option.iconSize; @@ -582,7 +582,7 @@ void KFileItemListView::applyRolesToModel() if (m_itemLayout == DetailsLayout) { roles.insert("isExpanded"); roles.insert("isExpandable"); - roles.insert("expansionLevel"); + roles.insert("expandedParentsCount"); } // Assure that the role that is used for sorting will be determined -- cgit v1.3.1