Fix issue #791:
authorunc0rr
Thu, 19 Jun 2014 23:32:11 +0400
changeset 10336 3edfa6b68407
parent 10335 d56b4c109abb
child 10337 05a5762ab12c
Fix issue #791: - Send drawn map data on room creation - Don't use MAP parameter to deduce mapgen when it is one of "+rnd+", "+drawn+", "+maze+"
QTfrontend/ui/widget/gamecfgwidget.cpp
QTfrontend/ui/widget/mapContainer.cpp
--- a/QTfrontend/ui/widget/gamecfgwidget.cpp	Thu Jun 19 15:29:31 2014 +0400
+++ b/QTfrontend/ui/widget/gamecfgwidget.cpp	Thu Jun 19 23:32:11 2014 +0400
@@ -402,6 +402,9 @@
     mapgenChanged(pMapContainer->get_mapgen());
     maze_sizeChanged(pMapContainer->getMazeSize());
 
+    if(pMapContainer->get_mapgen() == 2)
+        onDrawnMapChanged(pMapContainer->getDrawnMapData());
+
     // map must be the last
     QString map = pMapContainer->getCurrentMap();
     if (map.size())
--- a/QTfrontend/ui/widget/mapContainer.cpp	Thu Jun 19 15:29:31 2014 +0400
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Thu Jun 19 23:32:11 2014 +0400
@@ -416,15 +416,15 @@
 {
     if (map == "+rnd+")
     {
-        changeMapType(MapModel::GeneratedMap);
+        //changeMapType(MapModel::GeneratedMap);
     }
     else if (map == "+maze+")
     {
-        changeMapType(MapModel::GeneratedMaze);
+        //changeMapType(MapModel::GeneratedMaze);
     }
     else if (map == "+drawn+")
     {
-        changeMapType(MapModel::HandDrawnMap);
+        //changeMapType(MapModel::HandDrawnMap);
     }
     else if (m_staticMapModel->mapExists(map))
     {