- Don't generate seed twice
- Also update preview of missions when new one is chosen
--- a/QTfrontend/mapContainer.cpp Tue Sep 06 21:10:02 2011 +0400
+++ b/QTfrontend/mapContainer.cpp Tue Sep 06 21:15:01 2011 +0400
@@ -64,8 +64,6 @@
imageButt->setFlat(true);
imageButt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);//QSizePolicy::Minimum, QSizePolicy::Minimum);
mapLayout->addWidget(imageButt, 0, 0, 1, 2);
- //connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomSeed()));
- //connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomTheme()));
connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomMap()));
chooseMap = new QComboBox(mapWidget);
@@ -512,14 +510,13 @@
int i = MAPGEN_MAP + 3 + numMissions + rand() % (chooseMap->count() - MAPGEN_MAP - 3 - numMissions);
chooseMap->setCurrentIndex(i);
updatePreview();
- setRandomSeed();
}
void HWMapContainer::setRandomMission()
{
int i = MAPGEN_MAP + 2 + rand() % numMissions;
chooseMap->setCurrentIndex(i);
- setRandomSeed();
+ updatePreview();
}
void HWMapContainer::setRandomSeed()