From bb64e07657a99db56f1d02104062b7bea5e08218 Mon Sep 17 00:00:00 2001 From: lotodore Date: Sat, 27 Oct 2007 20:29:46 +0000 Subject: [PATCH] Show lobby for players if they are kicked during a game. --- src/gui/qt/mainwindow/mainwindowimpl.cpp | 10 ++++++++-- src/net/common/clientstate.cpp | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index 05970a9a..83f3c545 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -1126,9 +1126,15 @@ void mainWindowImpl::initGui(int speed) void mainWindowImpl::showClientDialog() { if (mySession->getGameType() == Session::GAME_TYPE_NETWORK) - showNetworkStartDialog(); + { + if (!myStartNetworkGameDialog->isVisible()) + showNetworkStartDialog(); + } else if (mySession->getGameType() == Session::GAME_TYPE_INTERNET) - showLobbyDialog(); + { + if (!myGameLobbyDialog->isVisible()) + showLobbyDialog(); + } } void mainWindowImpl::showNetworkStartDialog() diff --git a/src/net/common/clientstate.cpp b/src/net/common/clientstate.cpp index 5496480f..362298ec 100644 --- a/src/net/common/clientstate.cpp +++ b/src/net/common/clientstate.cpp @@ -407,6 +407,7 @@ AbstractClientStateReceiving::Process(ClientThread &client) NetPacketRemovedFromGame::Data removedData; tmpPacket->ToNetPacketRemovedFromGame()->GetData(removedData); client.ClearPlayerDataList(); + client.GetCallback().SignalNetClientWaitDialog(); client.GetCallback().SignalNetClientRemovedFromGame(removedData.removeReason); client.SetState(ClientStateWaitJoin::Instance()); }