X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/15e0c2a98f480f203ce168b6fa9a2e1f2b0ed8f8..dd07a327:/src/kitemviews/private/kitemlistsmoothscroller.cpp diff --git a/src/kitemviews/private/kitemlistsmoothscroller.cpp b/src/kitemviews/private/kitemlistsmoothscroller.cpp index 517f6d983..0e7546044 100644 --- a/src/kitemviews/private/kitemlistsmoothscroller.cpp +++ b/src/kitemviews/private/kitemlistsmoothscroller.cpp @@ -56,6 +56,9 @@ QScrollBar *KItemListSmoothScroller::scrollBar() const void KItemListSmoothScroller::setTargetObject(QObject *target) { + if (m_animation->state() == QAbstractAnimation::Running) { + m_animation->stop(); + } m_animation->setTargetObject(target); } @@ -66,6 +69,9 @@ QObject *KItemListSmoothScroller::targetObject() const void KItemListSmoothScroller::setPropertyName(const QByteArray &propertyName) { + if (m_animation->state() == QAbstractAnimation::Running) { + m_animation->stop(); + } m_animation->setPropertyName(propertyName); }