- Fix crash when changing maps
authorunc0rr
Thu, 16 Oct 2008 16:29:47 +0000
changeset 1365 2ffe20744a4a
parent 1364 64c4922a6960
child 1366 eba12c22f8ca
- Fix crash when changing maps - Fix message not sent when switching to generated map
QTfrontend/mapContainer.cpp
hedgewars.kdevelop
--- a/QTfrontend/mapContainer.cpp	Wed Oct 15 19:32:10 2008 +0000
+++ b/QTfrontend/mapContainer.cpp	Thu Oct 16 16:29:47 2008 +0000
@@ -58,7 +58,7 @@
   chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
   chooseMap->addItem(QComboBox::tr("generated map..."));
   chooseMap->addItems(*mapList);
-  connect(chooseMap, SIGNAL(activated(int)), this, SLOT(mapChanged(int)));
+  connect(chooseMap, SIGNAL(currentIndexChanged(int)), this, SLOT(mapChanged(int)));
   mainLayout.addWidget(chooseMap, 1, 1);
 
   QLabel * lblMap = new QLabel(tr("Map"), this);
@@ -200,7 +200,10 @@
 		chooseMap->setCurrentIndex(id);
 		loadMap(id);
 		if (pMap)
+		{
 			disconnect(pMap, 0, this, SLOT(setImage(const QImage)));
+			pMap = 0;
+		}
 	}
 }
 
--- a/hedgewars.kdevelop	Wed Oct 15 19:32:10 2008 +0000
+++ b/hedgewars.kdevelop	Thu Oct 16 16:29:47 2008 +0000
@@ -48,6 +48,7 @@
       <filetype>*.pas</filetype>
       <filetype>*.inc</filetype>
       <filetype>*.dpr</filetype>
+      <filetype>*.hs</filetype>
     </filetypes>
     <blacklist/>
     <general>
@@ -213,7 +214,7 @@
       <hidenonlocation>false</hidenonlocation>
     </groups>
     <tree>
-      <hidepatterns/>
+      <hidepatterns></hidepatterns>
       <hidenonprojectfiles>true</hidenonprojectfiles>
       <showvcsfields>false</showvcsfields>
     </tree>