- Don't generate seed twice
authorunc0rr
Tue, 06 Sep 2011 21:15:01 +0400
changeset 5795 3f36293e6945
parent 5794 cc6e8403664d
child 5796 663eea4da344
- Don't generate seed twice - Also update preview of missions when new one is chosen
QTfrontend/mapContainer.cpp
--- 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()