mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +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
d9e1db6ea4
commit
e71bdb0cf6
1 changed files with 3 additions and 1 deletions
|
@ -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