# HG changeset patch
# User nemo
# Date 1415017341 18000
# Node ID 79fe4266b2cab2d4f49a338a667299ba127b6cda
# Parent  dd3cf0c91cc926810b90fc65ce0af4e203a08150# Parent  987ac036c4537baea43301e5b8dad5c0a0bda6df
Merge of unc0rr's last change against default.

diff -r dd3cf0c91cc9 -r 79fe4266b2ca QTfrontend/ui/widget/mapContainer.cpp
--- a/QTfrontend/ui/widget/mapContainer.cpp	Sat Nov 01 11:20:37 2014 -0400
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Mon Nov 03 07:22:21 2014 -0500
@@ -554,19 +554,24 @@
     {
         mapgen = m;
 
+        bool f = false;
         switch (m)
         {
             case MAPGEN_REGULAR:
                 m_mapInfo.type = MapModel::GeneratedMap;
+                f = true;
                 break;
             case MAPGEN_MAZE:
                 m_mapInfo.type = MapModel::GeneratedMaze;
+                f = true;
                 break;
             case MAPGEN_PERLIN:
                 m_mapInfo.type = MapModel::GeneratedPerlin;
+                f = true;
                 break;
             case MAPGEN_DRAWN:
                 m_mapInfo.type = MapModel::HandDrawnMap;
+                f = true;
                 break;
             case MAPGEN_MAP:
                 switch (m_mapInfo.type)
@@ -582,7 +587,8 @@
                 break;
         }
 
-        emit mapgenChanged(m);
+        if(f)
+            changeMapType(m_mapInfo.type, QModelIndex());
     }
 }
 
@@ -883,11 +889,8 @@
         mapList->scrollTo(map);
     }
 
-    if (map.data(Qt::UserRole + 1).canConvert<MapModel::MapInfo>())
-        setMapInfo(map.data(Qt::UserRole + 1).value<MapModel::MapInfo>());
-    else
-        Q_ASSERT(false); // Houston, we have a problem.
-
+    Q_ASSERT(map.data(Qt::UserRole + 1).canConvert<MapModel::MapInfo>()); // Houston, we have a problem.
+    setMapInfo(map.data(Qt::UserRole + 1).value<MapModel::MapInfo>());
 }
 
 void HWMapContainer::setMapInfo(MapModel::MapInfo mapInfo)
diff -r dd3cf0c91cc9 -r 79fe4266b2ca project_files/hedgewars.pro
--- a/project_files/hedgewars.pro	Sat Nov 01 11:20:37 2014 -0400
+++ b/project_files/hedgewars.pro	Mon Nov 03 07:22:21 2014 -0500
@@ -251,7 +251,7 @@
 
 RESOURCES += ../QTfrontend/hedgewars.qrc
 
-LIBS += -L../bin -lhwphysfs -lphyslayer
+LIBS += -L../bin -lphysfs -lphyslayer
 
 macx {
     QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6