QTfrontend/hwform.cpp
changeset 324 f4c109c82a0c
parent 323 ea947f2c3d2f
child 327 a281ff0803f1
--- a/QTfrontend/hwform.cpp	Sat Jan 13 22:12:30 2007 +0000
+++ b/QTfrontend/hwform.cpp	Sat Jan 13 22:32:08 2007 +0000
@@ -159,7 +159,7 @@
 	if (id == ID_PAGE_MULTIPLAYER || id == ID_PAGE_NETCFG) {
 		QStringList tmNames=config->GetTeamsList();
 		TeamSelWidget* curTeamSelWidget;
-		id == ID_PAGE_MULTIPLAYER ? curTeamSelWidget=ui.pageMultiplayer->teamsSelect : 
+		id == ID_PAGE_MULTIPLAYER ? curTeamSelWidget=ui.pageMultiplayer->teamsSelect :
 		  curTeamSelWidget=ui.pageNetGame->pNetTeamsWidget;
 		QList<HWTeam> teamsList;
 		for(QStringList::iterator it=tmNames.begin(); it!=tmNames.end(); it++) {
@@ -337,11 +337,18 @@
 
 void HWForm::GameStateChanged(GameState gameState)
 {
-	if (gameState == gsStarted)
-	{
-		GoToPage(ID_PAGE_GAMESTATS);
-		ui.pageGameStats->labelGameStats->setText("");
+	switch(gameState) {
+		case gsStarted: {
+			ui.pageGameStats->labelGameStats->setText("");
+			break;
+		}
+		case gsFinished: {
+			GoToPage(ID_PAGE_GAMESTATS);
+			break;
+		}
+		default: ;
 	}
+
 }
 
 void HWForm::AddStatText(const QString & msg)