mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Fixed that deck elements visible state of JoinTablePanel was set wrongly.
This commit is contained in:
parent
f96c88f4cd
commit
b206983e75
2 changed files with 5 additions and 5 deletions
|
@ -59,7 +59,7 @@ public class JoinTableDialog extends MageDialog {
|
|||
this.tableId = tableId;
|
||||
this.isTournament = isTournament;
|
||||
this.newPlayerPanel.setPlayerName(MageFrame.getSession().getUserName());
|
||||
this.newPlayerPanel.showDeckElements(isLimited);
|
||||
this.newPlayerPanel.showDeckElements(!isLimited);
|
||||
this.setModal(true);
|
||||
this.setLocation(100, 100);
|
||||
this.setVisible(true);
|
||||
|
|
|
@ -252,8 +252,8 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
private void saveDividerLocations() {
|
||||
// save panel sizes and divider locations.
|
||||
Rectangle rec = MageFrame.getDesktop().getBounds();
|
||||
StringBuilder sb = new StringBuilder(Double.toString(rec.getWidth())).append("x").append(Double.toString(rec.getHeight()));
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE, sb.toString());
|
||||
String sb = Double.toString(rec.getWidth()) + "x" + Double.toString(rec.getHeight());
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE, sb);
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_1, Integer.toString(this.jSplitPane1.getDividerLocation()));
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_2, Integer.toString(this.jSplitPane2.getDividerLocation()));
|
||||
PreferencesDialog.saveValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_3, Integer.toString(chatPanel.getSplitDividerLocation()));
|
||||
|
@ -263,9 +263,9 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
Rectangle rec = MageFrame.getDesktop().getBounds();
|
||||
if (rec != null) {
|
||||
String size = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE, null);
|
||||
StringBuilder sb = new StringBuilder(Double.toString(rec.getWidth())).append("x").append(Double.toString(rec.getHeight()));
|
||||
String sb = Double.toString(rec.getWidth()) + "x" + Double.toString(rec.getHeight());
|
||||
// use divider positions only if screen size is the same as it was the time the settings were saved
|
||||
if (size != null && size.equals(sb.toString())) {
|
||||
if (size != null && size.equals(sb)) {
|
||||
String location = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_1, null);
|
||||
if (location != null && jSplitPane1 != null) {
|
||||
jSplitPane1.setDividerLocation(Integer.parseInt(location));
|
||||
|
|
Loading…
Reference in a new issue