forked from External/mage
* GUI: fixed that deck editor doesn't restore settings after games (cards list hides after draft/sideboarding, see #4350);
This commit is contained in:
parent
5585e1d878
commit
e07dd273f2
3 changed files with 713 additions and 697 deletions
|
|
@ -31,7 +31,6 @@ public class DeckArea extends javax.swing.JPanel {
|
|||
private BigCard lastBigCard = null;
|
||||
private int dividerLocationNormal = 0;
|
||||
private int dividerLocationLimited = 0;
|
||||
private static final boolean isLimitedBuildingOrientation = false;
|
||||
|
||||
public DeckCardLayout getCardLayout() {
|
||||
return deckList.getCardLayout();
|
||||
|
|
@ -163,7 +162,7 @@ public class DeckArea extends javax.swing.JPanel {
|
|||
});
|
||||
}
|
||||
|
||||
public Settings saveSettings() {
|
||||
public Settings saveSettings(boolean isLimitedBuildingOrientation) {
|
||||
Settings settings = new Settings();
|
||||
settings.maindeckSettings = deckList.saveSettings();
|
||||
settings.sideboardSetings = sideboardList.saveSettings();
|
||||
|
|
@ -177,7 +176,7 @@ public class DeckArea extends javax.swing.JPanel {
|
|||
return settings;
|
||||
}
|
||||
|
||||
public void loadSettings(Settings s) {
|
||||
public void loadSettings(Settings s, boolean isLimitedBuildingOrientation) {
|
||||
if (s != null) {
|
||||
deckList.loadSettings(s.maindeckSettings);
|
||||
sideboardList.loadSettings(s.sideboardSetings);
|
||||
|
|
@ -208,8 +207,8 @@ public class DeckArea extends javax.swing.JPanel {
|
|||
private void setGUISize() {
|
||||
}
|
||||
|
||||
public void setOrientation(boolean limitedBuildingOrientation) {
|
||||
if (limitedBuildingOrientation) {
|
||||
public void setOrientation(boolean isLimitedBuildingOrientation) {
|
||||
if (isLimitedBuildingOrientation) {
|
||||
deckAreaSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
|
||||
if (dividerLocationLimited != 0) {
|
||||
deckAreaSplitPane.setDividerLocation(dividerLocationLimited);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue