# HG changeset patch
# User belphegorr <szabibibi@gmail.com>
# Date 1340661429 -10800
# Node ID b216efbc00ff25afd32548acc78fc6c1314f1efc
# Parent  cdc38e49a276e0f34c9421d811ce73a135518a32
Fixed a bug where, after finishing a campaign mission, the user needed to reselect the team in the frontend in order to see the next mission.

diff -r cdc38e49a276 -r b216efbc00ff QTfrontend/game.cpp
--- a/QTfrontend/game.cpp	Mon Jun 25 11:17:19 2012 +0300
+++ b/QTfrontend/game.cpp	Tue Jun 26 00:57:09 2012 +0300
@@ -416,6 +416,10 @@
 {
     gameState = state;
     emit GameStateChanged(state);
+    if (gameType == gtCampaign)
+    {
+      emit CampStateChanged(1);
+    }
 }
 
 void HWGame::abort()
diff -r cdc38e49a276 -r b216efbc00ff QTfrontend/game.h
--- a/QTfrontend/game.h	Mon Jun 25 11:17:19 2012 +0300
+++ b/QTfrontend/game.h	Tue Jun 26 00:57:09 2012 +0300
@@ -72,6 +72,7 @@
         void GameStats(char type, const QString & info);
         void HaveRecord(bool isDemo, const QByteArray & record);
         void ErrorMessage(const QString &);
+        void CampStateChanged(int);
 
     public slots:
         void FromNet(const QByteArray & msg);
diff -r cdc38e49a276 -r b216efbc00ff QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Mon Jun 25 11:17:19 2012 +0300
+++ b/QTfrontend/hwform.cpp	Tue Jun 26 00:57:09 2012 +0300
@@ -1357,6 +1357,7 @@
 void HWForm::CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo)
 {
     game = new HWGame(config, gamecfg, ammo, pTeamSelWidget);
+    connect(game, SIGNAL(CampStateChanged(int)), this, SLOT(UpdateCampaignPage(int)));
     connect(game, SIGNAL(GameStateChanged(GameState)), this, SLOT(GameStateChanged(GameState)));
     connect(game, SIGNAL(GameStats(char, const QString &)), ui.pageGameStats, SLOT(GameStats(char, const QString &)));
     connect(game, SIGNAL(ErrorMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection);