equal
deleted
inserted
replaced
130 } |
130 } |
131 |
131 |
132 void HWMapContainer::loadMap(int index) |
132 void HWMapContainer::loadMap(int index) |
133 { |
133 { |
134 QPixmap mapImage; |
134 QPixmap mapImage; |
135 if(!mapImage.load(datadir->absolutePath() + "/Maps/" + chooseMap->currentText() + "/map.png")) { |
135 if(!mapImage.load(datadir->absolutePath() + "/Maps/" + chooseMap->currentText() + "/preview.png")) { |
136 changeImage(); |
136 changeImage(); |
137 chooseMap->setCurrentIndex(0); |
137 chooseMap->setCurrentIndex(0); |
138 return; |
138 return; |
139 } |
139 } |
140 imageButt->setIcon(mapImage.scaled(256, 128)); |
140 imageButt->setIcon(mapImage); |
141 QFile mapCfgFile(datadir->absolutePath() + "/Maps/" + chooseMap->currentText() + "/map.cfg"); |
141 QFile mapCfgFile(datadir->absolutePath() + "/Maps/" + chooseMap->currentText() + "/map.cfg"); |
142 if (mapCfgFile.open(QFile::ReadOnly)) { |
142 if (mapCfgFile.open(QFile::ReadOnly)) { |
143 QTextStream input(&mapCfgFile); |
143 QTextStream input(&mapCfgFile); |
144 input >> theme; |
144 input >> theme; |
145 mapCfgFile.close(); |
145 mapCfgFile.close(); |