From 903a9215ccf3fc1283fb7bf5126da8728779dace Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Sat, 27 Nov 2021 23:09:11 +0400 Subject: [PATCH] * Images: fixed wrong token filter and stats in images download dialog (#8443); --- .../plugins/card/images/DownloadPicturesService.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/images/DownloadPicturesService.java b/Mage.Client/src/main/java/org/mage/plugins/card/images/DownloadPicturesService.java index 8e3e97ae7d..7da3a0eb09 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/images/DownloadPicturesService.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/images/DownloadPicturesService.java @@ -314,6 +314,7 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements private void reloadCardsToDownload(String selectedItem) { // find selected sets selectedSets.clear(); + boolean onlyTokens = false; List formatSets; List sourceSets = selectedSource.getSupportedSets(); switch (selectedItem) { @@ -337,6 +338,8 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements break; case ALL_TOKENS: + selectedSets.addAll(selectedSource.getSupportedSets()); + onlyTokens = true; break; default: @@ -355,12 +358,14 @@ public class DownloadPicturesService extends DefaultBoundedRangeModel implements for (CardDownloadData data : cardsMissing) { if (data.isToken()) { if (selectedSource.isTokenSource() - && selectedSource.isTokenImageProvided(data.getSet(), data.getName(), data.getType())) { + && selectedSource.isTokenImageProvided(data.getSet(), data.getName(), data.getType()) + && selectedSets.contains(data.getSet())) { numberTokenImagesAvailable++; cardsDownloadQueue.add(data); } } else { - if (selectedSource.isCardSource() + if (!onlyTokens + && selectedSource.isCardSource() && selectedSource.isCardImageProvided(data.getSet(), data.getName()) && selectedSets.contains(data.getSet())) { numberCardImagesAvailable++;