Frontend:
authorsmxx
Wed, 17 Mar 2010 10:55:12 +0000
changeset 3009 8f4e6de8e4ef
parent 3008 e57cafce4227
child 3010 3aa3675d97eb
Frontend: * Fixed map selection
QTfrontend/gamecfgwidget.cpp
QTfrontend/mapContainer.cpp
--- a/QTfrontend/gamecfgwidget.cpp	Wed Mar 17 10:48:00 2010 +0000
+++ b/QTfrontend/gamecfgwidget.cpp	Wed Mar 17 10:55:12 2010 +0000
@@ -246,18 +246,8 @@
 
 void GameCFGWidget::mapChanged(const QString & value)
 {
-    if(pMapContainer->getCurrentIsMission())
-    {
-        GameSchemes->setCurrentIndex(0);
-        WeaponsName->setCurrentIndex(0);
-        GameSchemes->setEnabled(false);
-        WeaponsName->setEnabled(false);
-    }
-    else
-    {
-        GameSchemes->setEnabled(true);
-        WeaponsName->setEnabled(true);
-    }
+    GameSchemes->setEnabled(pMapContainer->getCurrentIsMission());
+    WeaponsName->setEnabled(pMapContainer->getCurrentIsMission());
     emit paramChanged("MAP", QStringList(value));
 }
 
--- a/QTfrontend/mapContainer.cpp	Wed Mar 17 10:48:00 2010 +0000
+++ b/QTfrontend/mapContainer.cpp	Wed Mar 17 10:55:12 2010 +0000
@@ -196,7 +196,7 @@
         gbThemes->hide();
         lblFilter->hide();
         CB_TemplateFilter->hide();
-        emit mapChanged(chooseMap->itemData(0).toList()[0].toString());
+        emit mapChanged(chooseMap->itemData(index).toList()[0].toString());
     }
 }
 
@@ -255,6 +255,7 @@
     mapInfo.push_back(QString("+rnd+"));
     mapInfo.push_back(theme);
     mapInfo.push_back(18);
+    mapInfo.push_back(false);
     chooseMap->setItemData(0, mapInfo);
     gbThemes->setIcon(QIcon(QString("%1/Themes/%2/icon.png").arg(datadir->absolutePath()).arg(theme)));
     emit themeChanged(theme);