fix cards having the wrong printing if rejoin game before card db finishes loading (#5390)

* rename cardInfoUpdated to refreshCardInfo and make it public

* refresh card infos when db finishes loading
This commit is contained in:
RickyRister 2024-12-29 19:25:11 -08:00 committed by GitHub
parent d231264a16
commit b6793a5e01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 24 additions and 5 deletions

View file

@ -25,7 +25,7 @@ AbstractCardItem::AbstractCardItem(QGraphicsItem *parent,
setCacheMode(DeviceCoordinateCache);
connect(&SettingsCache::instance(), SIGNAL(displayCardNamesChanged()), this, SLOT(callUpdate()));
cardInfoUpdated();
refreshCardInfo();
}
AbstractCardItem::~AbstractCardItem()
@ -51,7 +51,7 @@ void AbstractCardItem::pixmapUpdated()
emit sigPixmapUpdated();
}
void AbstractCardItem::cardInfoUpdated()
void AbstractCardItem::refreshCardInfo()
{
info = CardDatabaseManager::getInstance()->getCardByNameAndProviderId(name, providerId);
@ -185,7 +185,7 @@ void AbstractCardItem::setName(const QString &_name)
disconnect(info.data(), nullptr, this, nullptr);
name = _name;
cardInfoUpdated();
refreshCardInfo();
}
void AbstractCardItem::setProviderId(const QString &_providerId)
@ -200,7 +200,7 @@ void AbstractCardItem::setProviderId(const QString &_providerId)
}
providerId = _providerId;
cardInfoUpdated();
refreshCardInfo();
}
void AbstractCardItem::setHovered(bool _hovered)