|
@@ -84,6 +84,8 @@ public final class NewServerDialog extends StandardDialog implements ActionListe
|
84
|
84
|
private JButton editProfileButton;
|
85
|
85
|
/** Main frame. */
|
86
|
86
|
private MainFrame mainFrame;
|
|
87
|
+ /** Opening new server? */
|
|
88
|
+ private boolean openingServer = false;
|
87
|
89
|
|
88
|
90
|
/**
|
89
|
91
|
* Creates a new instance of the dialog.
|
|
@@ -244,6 +246,10 @@ public final class NewServerDialog extends StandardDialog implements ActionListe
|
244
|
246
|
* Saves the dialog changes.
|
245
|
247
|
*/
|
246
|
248
|
private void save() {
|
|
249
|
+ if (openingServer) {
|
|
250
|
+ dispose();
|
|
251
|
+ return;
|
|
252
|
+ }
|
247
|
253
|
if (!serverField.validateText()) {
|
248
|
254
|
serverField.requestFocusInWindow();
|
249
|
255
|
return;
|
|
@@ -258,6 +264,7 @@ public final class NewServerDialog extends StandardDialog implements ActionListe
|
258
|
264
|
final int port = Integer.parseInt(portField.getText());
|
259
|
265
|
|
260
|
266
|
dispose();
|
|
267
|
+ openingServer = true;
|
261
|
268
|
|
262
|
269
|
final Identity profile =
|
263
|
270
|
(Identity) identityField.getSelectedItem();
|