Fix stopping LimitedLoopsEmoji on last frame.

This commit is contained in:
John Preston 2023-01-23 12:21:31 +04:00
parent c006f8c304
commit 395795e37a

View file

@ -103,6 +103,7 @@ void LimitedLoopsEmoji::paint(QPainter &p, const Context &context) {
context.internal.forceLastFrame = wasLast;
} else if (_played + 1 == _limit && _inLoop && _stopOnLast) {
const auto wasLast = context.internal.overrideFirstWithLastFrame;
context.internal.overrideFirstWithLastFrame = true;
_wrapped->paint(p, context);
context.internal.overrideFirstWithLastFrame = wasLast;
} else {