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 <alessandro.portale@qt.io>
This commit is contained in:
Christian Stenger
2022-01-20 14:55:42 +01:00
parent 16ef8b6253
commit ca653a6a2c

View File

@@ -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();
}