fix issue 664 ("Quick game will fail if the randomly chosen theme is a DLC/custom one") 0.9.19
authorsheepluva
Fri, 07 Jun 2013 16:35:48 +0200
branch0.9.19
changeset 9124 955a90b88865
parent 9123 19c57656460f
child 9126 63bf1f4f40f8
child 9186 d87e2c7838fa
fix issue #664 ("Quick game will fail if the randomly chosen theme is a DLC/custom one")
QTfrontend/game.cpp
--- a/QTfrontend/game.cpp	Tue Jun 04 21:59:01 2013 +0200
+++ b/QTfrontend/game.cpp	Fri Jun 07 16:35:48 2013 +0200
@@ -153,7 +153,7 @@
 
     HWProto::addStringToBuffer(teamscfg, "TL");
     HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
-                               .arg((themeModel->rowCount() > 0) ? themeModel->index(rand() % themeModel->rowCount()).data().toString() : "steel"));
+                               .arg((themeModel->rowCount() > 0) ? themeModel->index(rand() % themeModel->rowCount()).data(ThemeModel::ActualNameRole).toString() : "steel"));
     HWProto::addStringToBuffer(teamscfg, "eseed " + QUuid::createUuid().toString());
 
     HWProto::addStringToBuffer(teamscfg, "e$template_filter 2");