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.
authorbelphegorr <szabibibi@gmail.com>
Tue, 26 Jun 2012 00:57:09 +0300
changeset 7207 b216efbc00ff
parent 7205 cdc38e49a276
child 7209 f1976889e1a7
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.
QTfrontend/game.cpp
QTfrontend/game.h
QTfrontend/hwform.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()
--- 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);
--- 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);