mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Merge pull request #2434 from spjspj/master
spjspj - Fix cube from deck from being broken with layouts
This commit is contained in:
commit
7e71b22fbe
2 changed files with 7 additions and 1 deletions
|
@ -585,7 +585,8 @@ public class NewTournamentDialog extends MageDialog {
|
||||||
} catch (GameException e1) {
|
} catch (GameException e1) {
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,5 +164,10 @@ public class Deck implements Serializable {
|
||||||
public void setDeckHashCode(long deckHashCode) {
|
public void setDeckHashCode(long deckHashCode) {
|
||||||
this.deckHashCode = deckHashCode;
|
this.deckHashCode = deckHashCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearLayouts() {
|
||||||
|
this.cardsLayout = null;
|
||||||
|
this.sideboardLayout = null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue