mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Prevent flashback cards losing their display area if graveyard open
This commit is contained in:
@@ -119,8 +119,11 @@ public abstract class VCardDisplayArea extends VDisplayArea implements ActivateH
|
|||||||
super.clear();
|
super.clear();
|
||||||
if (!cardPanels.isEmpty()) {
|
if (!cardPanels.isEmpty()) {
|
||||||
for (CardAreaPanel panel : cardPanels) {
|
for (CardAreaPanel panel : cardPanels) {
|
||||||
|
if (panel.displayArea == null || panel.displayArea == this ||
|
||||||
|
!panel.displayArea.cardPanels.contains(panel)) { //don't reset if panel's displayed in another area already
|
||||||
panel.reset();
|
panel.reset();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
cardPanels.clear();
|
cardPanels.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -332,6 +335,8 @@ public abstract class VCardDisplayArea extends VDisplayArea implements ActivateH
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void showZoom() {
|
private void showZoom() {
|
||||||
|
if (displayArea == null) { return; }
|
||||||
|
|
||||||
final List<CardView> cards = displayArea.orderedCards;
|
final List<CardView> cards = displayArea.orderedCards;
|
||||||
CardZoom.show(cards, cards.indexOf(getCard()), displayArea);
|
CardZoom.show(cards, cards.indexOf(getCard()), displayArea);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user