From 936a22ff772b0b1561ad0611c8a7ff3566e01dca Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 22 Jun 2011 07:16:40 +0200 Subject: 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 --- src/jrummikub/control/network/NetworkControl.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/jrummikub') 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); } }); -- cgit v1.2.3