mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
- CardItems have dummy CardInfos if they arent in the database (#3589)
- If a CardInfo has no sets, add a dummy one to try to download it by non-set specific templates.
This commit is contained in:
parent
c2150fd9bd
commit
e68305d7bf
3 changed files with 12 additions and 3 deletions
|
|
@ -45,8 +45,14 @@ void AbstractCardItem::pixmapUpdated()
|
|||
void AbstractCardItem::cardInfoUpdated()
|
||||
{
|
||||
info = db->getCard(name);
|
||||
if (info)
|
||||
connect(info.data(), SIGNAL(pixmapUpdated()), this, SLOT(pixmapUpdated()));
|
||||
|
||||
if (!info) {
|
||||
QVariantHash properties = QVariantHash();
|
||||
|
||||
info = CardInfo::newInstance(name, "", true, QVariantHash(), QList<CardRelation *>(), QList<CardRelation *>(),
|
||||
CardInfoPerSetMap(), false, -1, false);
|
||||
}
|
||||
connect(info.data(), SIGNAL(pixmapUpdated()), this, SLOT(pixmapUpdated()));
|
||||
|
||||
cacheBgColor();
|
||||
update();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue