mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Fixed creatures row being created when no creatures were on the field while creature stacking is enabled.
This commit is contained in:
@@ -211,6 +211,7 @@ public class PlayArea extends CardPanelContainer implements CardPanelMouseListen
|
|||||||
if (!panel.getAttachedPanels().isEmpty()
|
if (!panel.getAttachedPanels().isEmpty()
|
||||||
|| panel.getCard().isEnchanted()
|
|| panel.getCard().isEnchanted()
|
||||||
|| panel.getCard().isCloned()
|
|| panel.getCard().isCloned()
|
||||||
|
|| panel.getCard().isCopiedSpell()
|
||||||
|| !panel.getCard().getCounters().equals(firstPanel.getCard().getCounters())
|
|| !panel.getCard().getCounters().equals(firstPanel.getCard().getCounters())
|
||||||
|| (panel.getCard().isSick() != firstPanel.getCard().isSick())
|
|| (panel.getCard().isSick() != firstPanel.getCard().isSick())
|
||||||
|| (panel.getCard().getNetAttack() != firstPanel.getCard().getNetAttack())
|
|| (panel.getCard().getNetAttack() != firstPanel.getCard().getNetAttack())
|
||||||
@@ -255,9 +256,17 @@ public class PlayArea extends CardPanelContainer implements CardPanelMouseListen
|
|||||||
|
|
||||||
final CardStackRow lands = collectAllLands();
|
final CardStackRow lands = collectAllLands();
|
||||||
final CardStackRow tokens = collectAllTokens();
|
final CardStackRow tokens = collectAllTokens();
|
||||||
final CardStackRow creatures = FModel.getPreferences().getPrefBoolean(FPref.UI_STACK_CREATURES) ? collectAllCreatures() : new CardStackRow(this.getCardPanels(), RowType.CreatureNonToken);
|
final CardStackRow creatures;
|
||||||
final CardStackRow others = new CardStackRow(this.getCardPanels(), RowType.Other);
|
final CardStackRow others = new CardStackRow(this.getCardPanels(), RowType.Other);
|
||||||
|
|
||||||
|
final CardStackRow collectedCreatures = collectAllCreatures();
|
||||||
|
|
||||||
|
if (FModel.getPreferences().getPrefBoolean(FPref.UI_STACK_CREATURES) && !collectedCreatures.isEmpty()) {
|
||||||
|
creatures = collectedCreatures;
|
||||||
|
} else {
|
||||||
|
creatures = new CardStackRow(this.getCardPanels(), RowType.CreatureNonToken);
|
||||||
|
}
|
||||||
|
|
||||||
// should find an appropriate width of card
|
// should find an appropriate width of card
|
||||||
int maxCardWidth = this.getCardWidthMax();
|
int maxCardWidth = this.getCardWidthMax();
|
||||||
setCardWidth(maxCardWidth);
|
setCardWidth(maxCardWidth);
|
||||||
|
|||||||
Reference in New Issue
Block a user