--- a/QTfrontend/model/roomslistmodel.cpp Mon Jan 14 12:07:06 2013 +0400
+++ b/QTfrontend/model/roomslistmodel.cpp Mon Jan 14 11:19:59 2013 +0100
@@ -43,7 +43,8 @@
<< tr("Rules")
<< tr("Weapons");
- m_mapModel = DataManager::instance().mapModel();
+ m_staticMapModel = DataManager::instance().staticMapModel();
+ m_missionMapModel = DataManager::instance().missionMapModel();
}
@@ -134,7 +135,8 @@
}
// prefix ? if map not available
- if ((m_mapModel->indexOf(content) < 0))
+ if (!m_staticMapModel->mapExists(content) &&
+ !m_missionMapModel->mapExists(content))
return QString ("? %1").arg(content);
}
@@ -144,10 +146,14 @@
// dye map names red if map not available
if (role == Qt::ForegroundRole)
{
- if ((m_mapModel->indexOf(content) < 0))
+ if (content == "+rnd+" ||
+ content == "+maze+" ||
+ content == "+drawn+" ||
+ m_staticMapModel->mapExists(content) ||
+ m_missionMapModel->mapExists(content))
+ return QVariant();
+ else
return QBrush(QColor("darkred"));
- else
- return QVariant();
}
if (role == Qt::TextAlignmentRole)