QTfrontend/hwform.cpp
changeset 7245 53f73f4ae203
parent 7207 b216efbc00ff
child 7411 efc75c2d3be9
--- a/QTfrontend/hwform.cpp	Fri Jul 06 15:10:36 2012 +0300
+++ b/QTfrontend/hwform.cpp	Sun Jul 08 19:15:38 2012 +0300
@@ -1357,7 +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(CampStateChanged(int)), this, SLOT(UpdateCampaignPageProgress(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);
@@ -1592,6 +1592,13 @@
     }
 }
 
+void HWForm::UpdatecampaignPageProgress(int index)
+{
+  int missionIndex = ui.pageCampaign->CBMission->currentIndex();
+  UpdateCampaignPage(0);
+  ui.pageCampaign->CBMission->setCurrentIndex(missionIndex);
+}
+
 // used for --set-everything [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality]
 QString HWForm::getDemoArguments()
 {