QTfrontend/hwform.cpp
changeset 14667 e3e6b0c6543f
parent 14623 14b295892fb7
child 14691 56831f466d1d
--- a/QTfrontend/hwform.cpp	Mon Jan 21 07:10:59 2019 +0100
+++ b/QTfrontend/hwform.cpp	Mon Jan 21 09:12:39 2019 +0100
@@ -579,6 +579,7 @@
     ui.pageCampaign->CBTeam->clear();
     ui.pageTraining->CBTeam->clear();
     /* Only show human teams in campaign/training page */
+    bool playable = false;
     for(int i=0; i<teamslist.length(); i++)
     {
         HWTeam testTeam = HWTeam(teamslist[i]);
@@ -587,8 +588,13 @@
         {
             ui.pageCampaign->CBTeam->addItem(teamslist[i]);
             ui.pageTraining->CBTeam->addItem(teamslist[i]);
+            playable = true;
         }
     }
+    ui.pageCampaign->BtnStartCampaign->setEnabled(playable);
+    ui.pageCampaign->btnPreview->setEnabled(playable);
+    ui.pageTraining->btnStart->setEnabled(playable);
+    ui.pageTraining->btnPreview->setEnabled(playable);
     UpdateTrainingPageTeam(0);
 }