X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/2e22ffbfaee6fa905a678e54c93b9e4c7db2f71c..6c55cf4b6a89d0d58ee7a29122ac68ac70fad65c:/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); }