forked from qt-creator/qt-creator
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:
@@ -416,7 +416,7 @@ void ListItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
|||||||
offset = animationCurve.valueForProgress(animationProgress) * shiftY;
|
offset = animationCurve.valueForProgress(animationProgress) * shiftY;
|
||||||
if (offset < shiftY)
|
if (offset < shiftY)
|
||||||
QTimer::singleShot(10, this, &ListItemDelegate::goon);
|
QTimer::singleShot(10, this, &ListItemDelegate::goon);
|
||||||
} else {
|
} else if (index == m_previousIndex) {
|
||||||
m_previousIndex = QModelIndex();
|
m_previousIndex = QModelIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user