QTfrontend/ui/widget/mapContainer.cpp
changeset 10150 fa5c83fd0ad9
parent 10108 c68cf030eded
child 10159 5848ed144e0b
--- a/QTfrontend/ui/widget/mapContainer.cpp	Fri Feb 21 13:31:16 2014 +0400
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Sun Feb 23 10:06:58 2014 -0500
@@ -59,6 +59,7 @@
     m_previewEnabled = false;
     m_missionsViewSetup = false;
     m_staticViewSetup = false;
+    m_script = QString("");
 
     hhSmall.load(":/res/hh_small.png");
     hhLimit = 18;
@@ -315,7 +316,8 @@
                    getTemplateFilter(),
                    get_mapgen(),
                    getMazeSize(),
-                   getDrawnMapData()
+                   getDrawnMapData(),
+                   m_script
                   );
 
     setHHLimit(0);
@@ -413,6 +415,13 @@
         updatePreview();
 }
 
+void HWMapContainer::setScript(const QString & script)
+{
+    m_script = script;
+    if ((m_mapInfo.type == MapModel::GeneratedMap) || (m_mapInfo.type == MapModel::GeneratedMaze))
+        updatePreview();
+}
+
 void HWMapContainer::intSetMap(const QString & map)
 {
     if (map == "+rnd+")