summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/control')
-rw-r--r--src/jrummikub/control/ApplicationControl.java8
-rw-r--r--src/jrummikub/control/LoginControl.java5
2 files changed, 8 insertions, 5 deletions
diff --git a/src/jrummikub/control/ApplicationControl.java b/src/jrummikub/control/ApplicationControl.java
index 71de63e..58d1690 100644
--- a/src/jrummikub/control/ApplicationControl.java
+++ b/src/jrummikub/control/ApplicationControl.java
@@ -95,7 +95,7 @@ public class ApplicationControl {
public void handle() {
abortControls();
- createLoginControl();
+ createLoginControl(true);
}
});
@@ -121,7 +121,7 @@ public class ApplicationControl {
/**
* Create a new network login control
*/
- private void createLoginControl() {
+ private void createLoginControl(boolean reset) {
loginControl = new LoginControl(view);
loginControl.getLoginEvent().add(new IListener1<LoginData>() {
@Override
@@ -135,7 +135,7 @@ public class ApplicationControl {
startApplication();
}
});
- loginControl.startLogin();
+ loginControl.startLogin(reset);
}
/**
@@ -234,7 +234,7 @@ public class ApplicationControl {
@Override
public void handle() {
networkControl = null;
- createLoginControl();
+ createLoginControl(false);
}
});
diff --git a/src/jrummikub/control/LoginControl.java b/src/jrummikub/control/LoginControl.java
index f26b0d6..24bfcf6 100644
--- a/src/jrummikub/control/LoginControl.java
+++ b/src/jrummikub/control/LoginControl.java
@@ -53,7 +53,10 @@ public class LoginControl {
* Open Login panel
*
*/
- public void startLogin() {
+ public void startLogin(boolean reset) {
+ if (reset) {
+ view.resetLoginPanel();
+ }
view.showLoginPanel(true);
}