mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-20 00:41:23 +00:00
Fix autoscroll issue when selecting items
If items get selected with the rubberband the scroll offset must stay inside the visible range. BUG: 282353 FIXED-IN: 4.8.0
This commit is contained in:
parent
e76affea64
commit
a8622c7a1e
|
@ -1170,7 +1170,9 @@ void KItemListView::triggerAutoScrolling()
|
|||
// the autoscrolling may not get skipped anymore until a new rubberband is created
|
||||
m_skipAutoScrollForRubberBand = false;
|
||||
|
||||
setScrollOffset(scrollOffset() + m_autoScrollIncrement);
|
||||
const qreal maxVisibleOffset = qMax(qreal(0), maximumScrollOffset() - visibleSize);
|
||||
const qreal newScrollOffset = qMin(scrollOffset() + m_autoScrollIncrement, maxVisibleOffset);
|
||||
setScrollOffset(newScrollOffset);
|
||||
|
||||
// Trigger the autoscroll timer which will periodically call
|
||||
// triggerAutoScrolling()
|
||||
|
|
Loading…
Reference in a new issue