Script might well override a static map, but can't risk it not doing it, and preview completely failing. Better to just not try it for static maps. Some script cfg might help. Could also avoid unnnecessary preview regenerations even if the script was doing nothing at all.
authornemo
Sat, 01 Mar 2014 14:52:36 -0500
changeset 10171 00f41ff0bf2d
parent 10170 db625d96da73
child 10172 7cfd1a9356b5
Script might well override a static map, but can't risk it not doing it, and preview completely failing. Better to just not try it for static maps. Some script cfg might help. Could also avoid unnnecessary preview regenerations even if the script was doing nothing at all.
QTfrontend/ui/widget/mapContainer.cpp
--- a/QTfrontend/ui/widget/mapContainer.cpp	Sat Mar 01 23:37:59 2014 +0400
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Sat Mar 01 14:52:36 2014 -0500
@@ -408,7 +408,8 @@
 void HWMapContainer::setScript(const QString & script)
 {
     m_script = script;
-    askForGeneratedPreview();
+    if ((m_mapInfo.type == MapModel::GeneratedMap) || (m_mapInfo.type == MapModel::GeneratedMaze) || (m_mapInfo.type == MapModel::HandDrawnMap))
+        updatePreview();
 }
 
 void HWMapContainer::intSetMap(const QString & map)