spjspj - Fix cube from deck from being broken with layouts

This commit is contained in:
spjspj 2016-10-07 10:38:56 +11:00
parent 56e1a96d76
commit 72b0192bae
2 changed files with 7 additions and 1 deletions

View file

@ -586,6 +586,7 @@ public class NewTournamentDialog extends MageDialog {
JOptionPane.showMessageDialog(MageFrame.getDesktop(), e1.getMessage(), "Error loading deck", JOptionPane.ERROR_MESSAGE); JOptionPane.showMessageDialog(MageFrame.getDesktop(), e1.getMessage(), "Error loading deck", JOptionPane.ERROR_MESSAGE);
} }
if (cubeFromDeck != null) { if (cubeFromDeck != null) {
cubeFromDeck.clearLayouts();
tOptions.getLimitedOptions().setCubeFromDeck(cubeFromDeck); tOptions.getLimitedOptions().setCubeFromDeck(cubeFromDeck);
} }
} }

View file

@ -165,4 +165,9 @@ public class Deck implements Serializable {
this.deckHashCode = deckHashCode; this.deckHashCode = deckHashCode;
} }
public void clearLayouts() {
this.cardsLayout = null;
this.sideboardLayout = null;
}
} }