diff --git a/Mage.Client/src/main/java/mage/client/table/TablesPanel.java b/Mage.Client/src/main/java/mage/client/table/TablesPanel.java index 31b1868657..379075fb8d 100644 --- a/Mage.Client/src/main/java/mage/client/table/TablesPanel.java +++ b/Mage.Client/src/main/java/mage/client/table/TablesPanel.java @@ -60,7 +60,6 @@ import static mage.client.dialog.PreferencesDialog.KEY_TABLES_FILTER_SETTINGS; import static mage.client.dialog.PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_1; import static mage.client.dialog.PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_2; import static mage.client.dialog.PreferencesDialog.KEY_TABLES_DIVIDER_LOCATION_3; -import static mage.client.dialog.PreferencesDialog.KEY_MAGE_PANEL_LAST_SIZE; import mage.client.util.ButtonColumn; import mage.client.util.GUISizeHelper; import mage.client.util.IgnoreList; @@ -427,15 +426,15 @@ public class TablesPanel extends javax.swing.JPanel { } private void restoreDividers() { - Rectangle currentBounds = MageFrame.getDesktop().getBounds(); - if (currentBounds != null) { - String firstDivider = PreferencesDialog.getCachedValue(KEY_TABLES_DIVIDER_LOCATION_1, null); - String tableDivider = PreferencesDialog.getCachedValue(KEY_TABLES_DIVIDER_LOCATION_2, null); - String chatDivider = PreferencesDialog.getCachedValue(KEY_TABLES_DIVIDER_LOCATION_3, null); - GuiDisplayUtil.restoreDividerLocations(currentBounds, firstDivider, jSplitPane1); - GuiDisplayUtil.restoreDividerLocations(currentBounds, tableDivider, jSplitPaneTables); - GuiDisplayUtil.restoreDividerLocations(currentBounds, chatDivider, chatPanelMain); - } + Rectangle currentBounds = MageFrame.getDesktop().getBounds(); + if (currentBounds != null) { + String firstDivider = PreferencesDialog.getCachedValue(KEY_TABLES_DIVIDER_LOCATION_1, null); + String tableDivider = PreferencesDialog.getCachedValue(KEY_TABLES_DIVIDER_LOCATION_2, null); + String chatDivider = PreferencesDialog.getCachedValue(KEY_TABLES_DIVIDER_LOCATION_3, null); + GuiDisplayUtil.restoreDividerLocations(currentBounds, firstDivider, jSplitPane1); + GuiDisplayUtil.restoreDividerLocations(currentBounds, tableDivider, jSplitPaneTables); + GuiDisplayUtil.restoreDividerLocations(currentBounds, chatDivider, chatPanelMain); + } } public Map getUIComponents() { @@ -550,6 +549,7 @@ public class TablesPanel extends javax.swing.JPanel { this.jPanelBottom.setVisible(false); } else { this.jPanelBottom.setVisible(true); + URLHandler.RemoveMouseAdapter(jLabelFooterText); URLHandler.handleMessage(serverMessages.get(0), this.jLabelFooterText); this.jButtonFooterNext.setVisible(serverMessages.size() > 1); } diff --git a/Mage.Client/src/main/java/mage/client/util/URLHandler.java b/Mage.Client/src/main/java/mage/client/util/URLHandler.java index 6208bddbf7..19ee86f638 100644 --- a/Mage.Client/src/main/java/mage/client/util/URLHandler.java +++ b/Mage.Client/src/main/java/mage/client/util/URLHandler.java @@ -9,10 +9,10 @@ import java.awt.Desktop; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.io.IOException; -import java.net.URL; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; +import java.net.URL; import javax.swing.JLabel; /** @@ -47,6 +47,7 @@ public class URLHandler { private static MouseAdapter createMouseAdapter(String url) { currentMouseAdapter = new MouseAdapter() { + @Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() > 0) { if (Desktop.isDesktopSupported()) { @@ -57,7 +58,7 @@ public class URLHandler { } catch (IOException | URISyntaxException ex) { // do nothing } - } + } } } };