mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
If we have different heights on the same row, make it possible to update taller items correctly when the mouse is over the part that goes "out of the little one" line
svn path=/trunk/KDE/kdebase/apps/; revision=687625
This commit is contained in:
parent
6c64d1ca6b
commit
1bc9506260
1 changed files with 15 additions and 1 deletions
|
@ -98,6 +98,17 @@ const QModelIndexList &KCategorizedView::Private::intersectionSet(const QRect &r
|
|||
|
||||
intersectedIndexes.clear();
|
||||
|
||||
int itemHeight;
|
||||
|
||||
if (listView->gridSize().isEmpty())
|
||||
{
|
||||
itemHeight = biggestItemSize.height();
|
||||
}
|
||||
else
|
||||
{
|
||||
itemHeight = listView->gridSize().height();
|
||||
}
|
||||
|
||||
// Lets find out where we should start
|
||||
int top = proxyModel->rowCount() - 1;
|
||||
int bottom = 0;
|
||||
|
@ -108,10 +119,13 @@ const QModelIndexList &KCategorizedView::Private::intersectionSet(const QRect &r
|
|||
|
||||
index = elementDictionary[proxyModel->index(middle, 0)];
|
||||
indexVisualRect = visualRect(index);
|
||||
// We need the whole height (not only the visualRect). This will help us to update
|
||||
// all needed indexes correctly (ereslibre)
|
||||
indexVisualRect.setHeight(indexVisualRect.height() + (itemHeight - indexVisualRect.height()));
|
||||
|
||||
if (qMax(indexVisualRect.topLeft().y(),
|
||||
indexVisualRect.bottomRight().y()) < qMin(rect.topLeft().y(),
|
||||
rect.bottomRight().y()))
|
||||
rect.bottomRight().y()))
|
||||
{
|
||||
bottom = middle + 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue