mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 20:13:56 -07:00
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:
parent
d231264a16
commit
b6793a5e01
4 changed files with 24 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue