Frontend: Don't reset campaign mission selection to top of list after each play
authorWuzzy <Wuzzy2@mail.ru>
Wed, 16 Jan 2019 01:39:58 +0100
changeset 14621 13b22e2f2010
parent 14620 b86e6e4f3c58
child 14622 1d3f8cf48831
Frontend: Don't reset campaign mission selection to top of list after each play
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Wed Jan 16 00:37:26 2019 +0100
+++ b/QTfrontend/hwform.cpp	Wed Jan 16 01:39:58 2019 +0100
@@ -2145,11 +2145,11 @@
 {
     Q_UNUSED(index);
 
-    QString missionTitle = ui.pageCampaign->CBMission->currentText();
+    QString missionTitle = ui.pageCampaign->CBMission->currentData().toString();
     UpdateCampaignPage(0);
     for(int i=0;i<ui.pageCampaign->CBMission->count();i++)
     {
-        if (ui.pageCampaign->CBMission->itemData(i)==missionTitle)
+        if (ui.pageCampaign->CBMission->itemData(i).toString() == missionTitle)
         {
             ui.pageCampaign->CBMission->setCurrentIndex(i);
             break;