X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/68520f55f0b6b2fc450f646477bf3c535324aa2b..083248d16bf92003dfeb2106890ed4b068344dfc:/src/kitemviews/kitemlistview.cpp diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index 80a4ba7e3..b3d805a91 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -504,7 +504,11 @@ void KItemListView::scrollToItem(int index) const qreal headerHeight = m_headerWidget->size().height(); viewGeometry.adjust(0, headerHeight, 0, 0); } - const QRectF currentRect = itemRect(index); + QRectF currentRect = itemRect(index); + + // Fix for Bug 311099 - View the underscore when using Ctrl + PagDown + currentRect.adjust(-m_styleOption.horizontalMargin, -m_styleOption.verticalMargin, + m_styleOption.horizontalMargin, m_styleOption.verticalMargin); if (!viewGeometry.contains(currentRect)) { qreal newOffset = scrollOffset(); @@ -1244,8 +1248,10 @@ void KItemListView::slotGroupedSortingChanged(bool current) if (m_grouped) { updateGroupHeaderHeight(); } else { - // Clear all visible headers - QMutableHashIterator it (m_visibleGroups); + // Clear all visible headers. Note that the QHashIterator takes a copy of + // m_visibleGroups. Therefore, it remains valid even if items are removed + // from m_visibleGroups in recycleGroupHeaderForWidget(). + QHashIterator it(m_visibleGroups); while (it.hasNext()) { it.next(); recycleGroupHeaderForWidget(it.key());