From 61288b643990a2b296c07dabf26109d18e82db95 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Mon, 20 Sep 2021 02:44:46 +0400 Subject: [PATCH] * GUI: fixed wrong card icons drawing in choose triggers/piles dialog (#8225); --- .../main/java/mage/client/cards/CardArea.java | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/cards/CardArea.java b/Mage.Client/src/main/java/mage/client/cards/CardArea.java index ad8be6e3de..4b73077031 100644 --- a/Mage.Client/src/main/java/mage/client/cards/CardArea.java +++ b/Mage.Client/src/main/java/mage/client/cards/CardArea.java @@ -186,14 +186,22 @@ public class CardArea extends JPanel implements CardEventProducer { card = tmp; } - CardIconRenderSettings customIconsRender = new CardIconRenderSettings() - .withDebugMode(true) - .withCustomPosition(customCardIconPosition) - .withCustomOrder(customCardIconOrder) - .withCustomColor(customCardIconColor) - .withCustomMaxVisibleCount(customCardIconsMaxVisibleCount) - .withCustomIconSizePercent(30); - MageCard cardPanel = Plugins.instance.getMageCard(card, bigCard, customIconsRender, cardDimension, gameId, true, true, + CardIconRenderSettings currentIconsRender; + if (this.customRenderMode >= 0) { + // debug + currentIconsRender = new CardIconRenderSettings() + .withDebugMode(true) + .withCustomPosition(customCardIconPosition) + .withCustomOrder(customCardIconOrder) + .withCustomColor(customCardIconColor) + .withCustomMaxVisibleCount(customCardIconsMaxVisibleCount) + .withCustomIconSizePercent(30); + } else { + // default + currentIconsRender = new CardIconRenderSettings(); + } + + MageCard cardPanel = Plugins.instance.getMageCard(card, bigCard, currentIconsRender, cardDimension, gameId, true, true, customRenderMode != -1 ? customRenderMode : PreferencesDialog.getRenderMode(), customNeedFullPermanentRender); cardPanel.setCardContainerRef(this); cardPanel.update(card);