diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-06-22 07:16:40 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-06-22 07:16:40 +0200 |
commit | 936a22ff772b0b1561ad0611c8a7ff3566e01dca (patch) | |
tree | f79bb157df600c8919f501f5b00a8d4b91381494 /src/jrummikub | |
parent | ada8c1869c5b2b007e690e4c028fd20b34a41706 (diff) | |
download | JRummikub-936a22ff772b0b1561ad0611c8a7ff3566e01dca.tar JRummikub-936a22ff772b0b1561ad0611c8a7ff3566e01dca.zip |
Correctly reset network control after a game was aborted
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@582 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub')
-rw-r--r-- | src/jrummikub/control/network/NetworkControl.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/jrummikub/control/network/NetworkControl.java b/src/jrummikub/control/network/NetworkControl.java index 5e38d1e..85a0aff 100644 --- a/src/jrummikub/control/network/NetworkControl.java +++ b/src/jrummikub/control/network/NetworkControl.java @@ -240,6 +240,12 @@ public class NetworkControl { view.showGameListPanel(false); view.showConnectPanel(false); + abortControls(); + + connectionControl.disconnect(); + } + + private void abortControls() { if (settingsControl != null) { settingsControl.abort(); settingsControl = null; @@ -256,8 +262,6 @@ public class NetworkControl { gameControl.abortGame(); gameControl = null; } - - connectionControl.disconnect(); } /** @@ -355,6 +359,7 @@ public class NetworkControl { @Override public void handle() { view.setBottomPanel(BottomPanelType.START_GAME_PANEL); + abortControls(); view.showGameListPanel(true); } }); @@ -362,6 +367,7 @@ public class NetworkControl { @Override public void handle() { view.setBottomPanel(BottomPanelType.START_GAME_PANEL); + abortControls(); view.showGameListPanel(true); } }); |