From 9e12c5b2d44caf3f02beee8bb81bfea07331e92d Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 27 Jul 2014 22:06:35 +0200 Subject: [PATCH] Use custom picUrl if picUrlHq is not defined --- cockatrice/src/carddatabase.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cockatrice/src/carddatabase.cpp b/cockatrice/src/carddatabase.cpp index e216c10f..f77b98d5 100644 --- a/cockatrice/src/carddatabase.cpp +++ b/cockatrice/src/carddatabase.cpp @@ -153,12 +153,18 @@ QString PictureLoader::getPicUrl(CardInfo *card) { if (!picDownload) return 0; - // first check if a custom card url exists in cards.xml CardSet *set = card->getPreferredSet(); - QString picUrl = picDownloadHq ? - card->getCustomPicURLHq(set->getShortName()) : - card->getCustomPicURL(set->getShortName()); + QString picUrl = QString(""); + // first check if Hq is enabled and a custom Hq card url exists in cards.xml + if(picDownloadHq) + { + picUrl = card->getCustomPicURLHq(set->getShortName()); + if (!picUrl.isEmpty()) + return picUrl; + } + // then, test for a custom, non-Hq card url in cards.xml + picUrl = card->getCustomPicURL(set->getShortName()); if (!picUrl.isEmpty()) return picUrl;