QTfrontend/hwform.cpp
branchspacecampaign
changeset 9641 b08c8bde57e3
parent 9482 1c0f330f28f8
child 9646 7588daa8d28f
--- a/QTfrontend/hwform.cpp	Wed Sep 18 04:24:10 2013 +0300
+++ b/QTfrontend/hwform.cpp	Thu Sep 19 02:33:23 2013 +0300
@@ -1923,9 +1923,16 @@
 {
     Q_UNUSED(index);
 
-    int missionIndex = ui.pageCampaign->CBMission->currentIndex();
+    QString missionTitle = ui.pageCampaign->CBMission->currentText();
     UpdateCampaignPage(0);
-    ui.pageCampaign->CBMission->setCurrentIndex(missionIndex);
+    for(int i=0;i<ui.pageCampaign->CBMission->count();i++)
+    {
+		if (ui.pageCampaign->CBMission->itemText(i)==missionTitle)
+		{
+			ui.pageCampaign->CBMission->setCurrentIndex(i);
+			break;
+		}
+	}
 }
 
 // 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]