┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
diff options
context:
space:
mode:
Diffstat (limited to 'src/kitemviews')
-rw-r--r--src/kitemviews/private/kitemlistsmoothscroller.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kitemviews/private/kitemlistsmoothscroller.cpp b/src/kitemviews/private/kitemlistsmoothscroller.cpp
index 7cedf9d94..dc7db23d6 100644
--- a/src/kitemviews/private/kitemlistsmoothscroller.cpp
+++ b/src/kitemviews/private/kitemlistsmoothscroller.cpp
@@ -136,6 +136,12 @@ void KItemListSmoothScroller::scrollTo(qreal position)
if (newValue != m_scrollBar->value()) {
m_smoothScrolling = true;
m_scrollBar->setValue(newValue);
+ } else {
+ // The target position is the one we are already at, so no animation will
+ // run and slotAnimationStateChanged() will not emit scrollingStopped().
+ // Emit it here so callers waiting for the view to settle (e.g. inline
+ // rename via KItemListView::scrollToItem()) are not left hanging.
+ Q_EMIT scrollingStopped();
}
}