From ca653a6a2cef48c2b330cb863f2fa36480387bf5 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 20 Jan 2022 14:55:42 +0100 Subject: [PATCH] Core: Fix resetting animation timer on marketplace items While the current animation is played other items may be painted as well and will reset the animation what they should not. Reset the animation hover timer only if it is the same item we are hovering over. Fixes: QTCREATORBUG-26908 Change-Id: I5fc55b5efb6f6b0db541604a92c7e4ddb8811336 Reviewed-by: Alessandro Portale --- src/plugins/coreplugin/welcomepagehelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/welcomepagehelper.cpp b/src/plugins/coreplugin/welcomepagehelper.cpp index b78886c04a6..0fb8e0fa3c3 100644 --- a/src/plugins/coreplugin/welcomepagehelper.cpp +++ b/src/plugins/coreplugin/welcomepagehelper.cpp @@ -416,7 +416,7 @@ void ListItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti offset = animationCurve.valueForProgress(animationProgress) * shiftY; if (offset < shiftY) QTimer::singleShot(10, this, &ListItemDelegate::goon); - } else { + } else if (index == m_previousIndex) { m_previousIndex = QModelIndex(); }