From 9ba000d7f925a1b1d803cdfeaee3cfcd276b0a0a Mon Sep 17 00:00:00 2001 From: lotodore Date: Mon, 8 Oct 2007 20:32:17 +0000 Subject: [PATCH] Stop all GUI timers before starting an internet / network game. --- src/gui/qt/mainwindow/mainwindowimpl.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index 210ff666..308e89bb 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -833,6 +833,9 @@ void mainWindowImpl::callCreateNetworkGameDialog() { // if (myCreateNetworkGameDialog->result() == QDialog::Accepted ) { + // Stop local game. + stopTimer(); + if (!myServerGuiInterface.get()) { // Create pseudo Gui Wrapper for the server. @@ -913,6 +916,9 @@ void mainWindowImpl::callJoinNetworkGameDialog() { if (myJoinNetworkGameDialog->result() == QDialog::Accepted ) { + // Stop local game. + stopTimer(); + mySession->terminateNetworkClient(); if (myServerGuiInterface.get()) myServerGuiInterface->getSession().terminateNetworkServer(); @@ -964,6 +970,9 @@ void mainWindowImpl::callGameLobbyDialog() { void mainWindowImpl::joinGameLobby() { + // Stop local game. + stopTimer(); + // Join Lobby mySession->terminateNetworkClient(); if (myServerGuiInterface.get())