[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdeui/itemviews
From: Stephen Kelly <steveire () gmail ! com>
Date: 2010-09-15 16:58:39
Message-ID: 20100915170322.46EEBAC888 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1175718 by skelly:
Don't create a QItemSelection with duplicate ranges.
The 'source' selection model might have a selection which includes
a particular index and its parent. We need to be careful to not
include the overlap twice in the result.
BUG: 251274
M +9 -0 kbreadcrumbselectionmodel.cpp
--- trunk/KDE/kdelibs/kdeui/itemviews/kbreadcrumbselectionmodel.cpp #1175717:1175718
@@ -135,12 +135,21 @@
for ( ; it != end; ++it)
{
QModelIndex parent = it->parent();
+
+ if (breadcrumbSelection.contains(parent))
+ continue;
+
int sumBreadcrumbs = 0;
bool includeAll = m_selectionDepth < 0;
+
while (parent.isValid() && (includeAll || sumBreadcrumbs < m_selectionDepth))
{
breadcrumbSelection.append(QItemSelectionRange(parent));
parent = parent.parent();
+
+ if (breadcrumbSelection.contains(parent))
+ break;
+
++sumBreadcrumbs;
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic