mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
Reimplemented PictureLoader as a singleton
* Removed remaining picture handling from card database and cardinfo * removed the “noCard object” hack
This commit is contained in:
parent
8125358052
commit
f6c7f3355f
20 changed files with 654 additions and 704 deletions
|
|
@ -32,6 +32,7 @@
|
|||
#include "main.h"
|
||||
#include "settingscache.h"
|
||||
#include "carddatabase.h"
|
||||
#include "pictureloader.h"
|
||||
#include "replay_timeline_widget.h"
|
||||
#include "lineeditcompleter.h"
|
||||
|
||||
|
|
@ -242,7 +243,7 @@ void DeckViewContainer::deckSelectFinished(const Response &r)
|
|||
{
|
||||
const Response_DeckDownload &resp = r.GetExtension(Response_DeckDownload::ext);
|
||||
DeckLoader newDeck(QString::fromStdString(resp.deck()));
|
||||
db->cacheCardPixmaps(newDeck.getCardList());
|
||||
PictureLoader::cacheCardPixmaps(db->getCards(newDeck.getCardList()));
|
||||
setDeck(newDeck);
|
||||
}
|
||||
|
||||
|
|
@ -1044,7 +1045,7 @@ void TabGame::eventGameStateChanged(const Event_GameStateChanged &event, int /*e
|
|||
DeckViewContainer *deckViewContainer = deckViewContainers.value(playerId);
|
||||
if (playerInfo.has_deck_list()) {
|
||||
DeckLoader newDeck(QString::fromStdString(playerInfo.deck_list()));
|
||||
db->cacheCardPixmaps(newDeck.getCardList());
|
||||
PictureLoader::cacheCardPixmaps(db->getCards(newDeck.getCardList()));
|
||||
deckViewContainer->setDeck(newDeck);
|
||||
player->setDeck(newDeck);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue