Due to changes in
15e0c2a98f480f203ce168b6fa9a2e1f2b0ed8f8 we do not
automatically stop animations now on property or targetobject change,
which causes warnings and timeouts.
This patch makes sure we stop them if their state is Running,
before modifying them.
See also:
https://invent.kde.org/system/dolphin/-/merge_requests/857#note_1083279
void KItemListSmoothScroller::setTargetObject(QObject *target)
{
+ if (m_animation->state() == QAbstractAnimation::Running) {
+ m_animation->stop();
+ }
m_animation->setTargetObject(target);
}
void KItemListSmoothScroller::setPropertyName(const QByteArray &propertyName)
{
+ if (m_animation->state() == QAbstractAnimation::Running) {
+ m_animation->stop();
+ }
m_animation->setPropertyName(propertyName);
}