GUI: fixed wrong card icon rendering after theme change

This commit is contained in:
Oleg Agafonov 2023-03-09 22:07:21 +04:00
parent 743143acde
commit d67376641a

View file

@ -3,6 +3,7 @@ package mage.client.themes;
import mage.abilities.hint.HintUtils; import mage.abilities.hint.HintUtils;
import mage.abilities.icon.CardIconColor; import mage.abilities.icon.CardIconColor;
import org.mage.card.arcane.SvgUtils; import org.mage.card.arcane.SvgUtils;
import org.mage.plugins.card.images.ImageCache;
import java.awt.*; import java.awt.*;
@ -347,5 +348,8 @@ public enum ThemeType {
for (CardIconColor cardIconColor : CardIconColor.values()) { for (CardIconColor cardIconColor : CardIconColor.values()) {
SvgUtils.prepareCss(this.getCardIconsCssFile(cardIconColor), this.getCardIconsCssSettings(cardIconColor), true); SvgUtils.prepareCss(this.getCardIconsCssFile(cardIconColor), this.getCardIconsCssSettings(cardIconColor), true);
} }
// reload card icons and other rendering things from cache - it can depend on current theme
ImageCache.clearCache();
} }
} }