* Client connect - Fixed that reconnect request was also shown if no successful connection was set up before.

This commit is contained in:
LevelX2 2014-09-25 23:13:05 +02:00
parent 7e9accb0fd
commit 2c63d3bff8
6 changed files with 16 additions and 11 deletions

View file

@ -1224,7 +1224,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
}
@Override
public void disconnected() {
public void disconnected(final boolean errorCall) {
if (SwingUtilities.isEventDispatchThread()) {
setStatusText("Not connected");
disableButtons();
@ -1238,13 +1238,10 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
disableButtons();
hideGames();
hideTables();
if (JOptionPane.showConfirmDialog(MageFrame.this, "The connection to server was lost. Reconnect?", "Warning", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
// session.disconnect(false);
// tablesPane.clearChat();
if (errorCall && JOptionPane.showConfirmDialog(MageFrame.this, "The connection to server was lost. Reconnect?", "Warning", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
if (performConnect()) {
enableButtons();
}
// } else {
}
}
});