QTfrontend/ui/widget/mapContainer.cpp
changeset 11753 5c192a4751d8
parent 11744 ac58a063d26a
child 11754 2e4f0d0fec99
--- a/QTfrontend/ui/widget/mapContainer.cpp	Thu Apr 28 00:41:09 2016 +0200
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Thu Apr 28 02:06:35 2016 +0200
@@ -527,9 +527,10 @@
 
 void HWMapContainer::setRandomTheme()
 {
-    if(!m_themeModel->rowCount()) return;
-    quint32 themeNum = rand() % m_themeModel->rowCount();
-    updateTheme(m_themeModel->index(themeNum));
+    QAbstractItemModel * tmodel = m_themeModel->withoutDLC();
+    if(!tmodel->rowCount()) return;
+    quint32 themeNum = rand() % tmodel->rowCount();
+    updateTheme(tmodel->index(themeNum,0));
     emit themeChanged(m_theme);
 }