QTfrontend/ui/widget/gamecfgwidget.cpp
changeset 10151 8fc1459a9f54
parent 10150 fa5c83fd0ad9
child 10336 3edfa6b68407
--- a/QTfrontend/ui/widget/gamecfgwidget.cpp	Sun Feb 23 10:06:58 2014 -0500
+++ b/QTfrontend/ui/widget/gamecfgwidget.cpp	Sun Feb 23 13:47:15 2014 -0500
@@ -445,8 +445,8 @@
         }
         if (param == "SCRIPT")
         {
-            pMapContainer->setScript(value);
             Scripts->setCurrentIndex(Scripts->findText(value));
+            pMapContainer->setScript(Scripts->itemData(Scripts->currentIndex(), GameStyleModel::ScriptRole).toString().toUtf8());
             return;
         }
         if (param == "DRAWNMAP")
@@ -652,6 +652,7 @@
     else
     {
         pMapContainer->setScript(name);
+        pMapContainer->setScript(Scripts->itemData(index, GameStyleModel::ScriptRole).toString().toUtf8());
     }
     emit paramChanged("SCRIPT", QStringList(name));
 }