QTfrontend/util/DataManager.cpp
changeset 8377 869f80966a77
parent 8346 3443e0de2c9d
child 8508 f849b7b3af1d
--- a/QTfrontend/util/DataManager.cpp	Mon Jan 14 12:07:06 2013 +0400
+++ b/QTfrontend/util/DataManager.cpp	Mon Jan 14 11:19:59 2013 +0100
@@ -40,7 +40,8 @@
 DataManager::DataManager()
 {
     m_hatModel = NULL;
-    m_mapModel = NULL;
+    m_staticMapModel = NULL;
+    m_missionMapModel = NULL;
     m_themeModel = NULL;
     m_colorsModel = NULL;
     m_bindsModel = NULL;
@@ -92,13 +93,22 @@
     return m_hatModel;
 }
 
-MapModel * DataManager::mapModel()
+MapModel * DataManager::staticMapModel()
 {
-    if (m_mapModel == NULL) {
-        m_mapModel = new MapModel();
-        m_mapModel->loadMaps();
+    if (m_staticMapModel == NULL) {
+        m_staticMapModel = new MapModel();
+        m_staticMapModel->loadMaps(MapModel::StaticMap);
     }
-    return m_mapModel;
+    return m_staticMapModel;
+}
+
+MapModel * DataManager::missionMapModel()
+{
+    if (m_missionMapModel == NULL) {
+        m_missionMapModel = new MapModel();
+        m_missionMapModel->loadMaps(MapModel::MissionMap);
+    }
+    return m_missionMapModel;
 }
 
 ThemeModel * DataManager::themeModel()