Merge pull request #214 from pliu037/master

Added better support for custom card images
This commit is contained in:
Gavin Bisesi 2014-07-31 13:42:57 -04:00
commit ffed0e00fe

View file

@ -129,8 +129,9 @@ void PictureLoader::processLoadQueue()
QString setName = ptl.getSetName(); QString setName = ptl.getSetName();
QImage image; QImage image;
if (!image.load(QString("%1/%2/%3.full.jpg").arg(picsPath).arg("CUSTOM").arg(correctedName))) {
if (!image.load(QString("%1/%2/%3.full.jpg").arg(picsPath).arg(setName).arg(correctedName))) if (!image.load(QString("%1/%2/%3.full.jpg").arg(picsPath).arg(setName).arg(correctedName)))
if (!image.load(QString("%1/%2/%3%4.full.jpg").arg(picsPath).arg(setName).arg(correctedName).arg(1))) //if (!image.load(QString("%1/%2/%3%4.full.jpg").arg(picsPath).arg(setName).arg(correctedName).arg(1)))
if (!image.load(QString("%1/%2/%3/%4.full.jpg").arg(picsPath).arg("downloadedPics").arg(setName).arg(correctedName))) { if (!image.load(QString("%1/%2/%3/%4.full.jpg").arg(picsPath).arg("downloadedPics").arg(setName).arg(correctedName))) {
if (picDownload) { if (picDownload) {
cardsToDownload.append(ptl); cardsToDownload.append(ptl);
@ -142,7 +143,7 @@ void PictureLoader::processLoadQueue()
else else
emit imageLoaded(ptl.getCard(), QImage()); emit imageLoaded(ptl.getCard(), QImage());
} }
continue; }
} }
emit imageLoaded(ptl.getCard(), image); emit imageLoaded(ptl.getCard(), image);