QTfrontend/hwform.cpp
changeset 11963 de66192866d3
parent 11962 1201fc039e24
child 11964 3c15903256a7
equal deleted inserted replaced
11962:1201fc039e24 11963:de66192866d3
  1880     campaignMissionInfo = getCampMissionList(campaignName,tName);
  1880     campaignMissionInfo = getCampMissionList(campaignName,tName);
  1881     ui.pageCampaign->CBMission->clear();
  1881     ui.pageCampaign->CBMission->clear();
  1882 
  1882 
  1883     for(int i=0;i<campaignMissionInfo.size();i++)
  1883     for(int i=0;i<campaignMissionInfo.size();i++)
  1884     {
  1884     {
  1885         ui.pageCampaign->CBMission->addItem(QString(campaignMissionInfo[i].name), QString(campaignMissionInfo[i].name));
  1885         ui.pageCampaign->CBMission->addItem(QString(campaignMissionInfo[i].realName), QString(campaignMissionInfo[i].name));
  1886         if(isMissionWon(campaignName, i, tName))
  1886         if(isMissionWon(campaignName, i, tName))
  1887             ui.pageCampaign->CBMission->setItemIcon(i, finishedIcon);
  1887             ui.pageCampaign->CBMission->setItemIcon(i, finishedIcon);
  1888         else
  1888         else
  1889             ui.pageCampaign->CBMission->setItemIcon(i, QIcon());
  1889             ui.pageCampaign->CBMission->setItemIcon(i, QIcon());
  1890     }
  1890     }
  1933 
  1933 
  1934     QString missionTitle = ui.pageCampaign->CBMission->currentText();
  1934     QString missionTitle = ui.pageCampaign->CBMission->currentText();
  1935     UpdateCampaignPage(0);
  1935     UpdateCampaignPage(0);
  1936     for(int i=0;i<ui.pageCampaign->CBMission->count();i++)
  1936     for(int i=0;i<ui.pageCampaign->CBMission->count();i++)
  1937     {
  1937     {
  1938         if (ui.pageCampaign->CBMission->itemText(i)==missionTitle)
  1938         if (ui.pageCampaign->CBMission->itemData(i)==missionTitle)
  1939         {
  1939         {
  1940             ui.pageCampaign->CBMission->setCurrentIndex(i);
  1940             ui.pageCampaign->CBMission->setCurrentIndex(i);
  1941             break;
  1941             break;
  1942         }
  1942         }
  1943     }
  1943     }