┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kitemviews/kitemlistview.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp
index be03606ce..5dbc128b5 100644
--- a/src/kitemviews/kitemlistview.cpp
+++ b/src/kitemviews/kitemlistview.cpp
@@ -201,13 +201,19 @@ qreal KItemListView::maximumScrollOffset() const
void KItemListView::setItemOffset(qreal offset)
{
+ if (m_layouter->itemOffset() == offset) {
+ return;
+ }
+
m_layouter->setItemOffset(offset);
if (m_header) {
m_header->setPos(-offset, 0);
}
- if (!m_layoutTimer->isActive()) {
- doLayout(NoAnimation);
- }
+
+ // Don't check whether the m_layoutTimer is active: Changing the
+ // item offset must always trigger a synchronous layout, otherwise
+ // the smooth-scrolling might get jerky.
+ doLayout(NoAnimation);
}
qreal KItemListView::itemOffset() const