QTfrontend/game.cpp
changeset 13318 93780a3b846a
parent 13316 574d34577ee9
child 13394 24b531dcebe7
child 13633 d5e029b84e16
--- a/QTfrontend/game.cpp	Sat Apr 07 22:16:36 2018 +0200
+++ b/QTfrontend/game.cpp	Sat Apr 07 23:38:19 2018 +0200
@@ -140,11 +140,11 @@
 void HWGame::SendQuickConfig()
 {
     QByteArray teamscfg;
-    ThemeModel * themeModel = DataManager::instance().themeModel();
+    QAbstractItemModel * themeModel = DataManager::instance().themeModel()->withoutHidden();
 
     HWProto::addStringToBuffer(teamscfg, "TL");
     HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
-                               .arg((themeModel->rowCount() > 0) ? themeModel->index(rand() % themeModel->rowCount()).data(ThemeModel::ActualNameRole).toString() : "Nature"));
+                               .arg((themeModel->rowCount() > 0) ? themeModel->index(rand() % themeModel->rowCount(), 0).data(ThemeModel::ActualNameRole).toString() : "Nature"));
     HWProto::addStringToBuffer(teamscfg, "eseed " + QUuid::createUuid().toString());
 
     HWProto::addStringToBuffer(teamscfg, "e$template_filter 2");