mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
[PictureLoader] Leave failed pixmap null so solid color is shown instead.
This commit is contained in:
parent
6e5c58069b
commit
deb46a38b8
1 changed files with 2 additions and 1 deletions
|
|
@ -138,7 +138,8 @@ void CardPictureLoader::getPixmap(QPixmap &pixmap, const ExactCard &card, QSize
|
|||
QPixmap bigPixmap;
|
||||
if (QPixmapCache::find(key, &bigPixmap)) {
|
||||
if (bigPixmap.isNull()) {
|
||||
getCardBackLoadingFailedPixmap(pixmap, size);
|
||||
// Leave the pixmap null so callers fall back to a solid color
|
||||
// instead of showing the card back.
|
||||
QDateTime failedAtTime = getInstance().failedAt.value(key);
|
||||
if (!failedAtTime.isValid() ||
|
||||
failedAtTime.addSecs(RETRY_FAILED_CARDS_SECS) < QDateTime::currentDateTime()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue