Fix some map preview properly problems when host switches to image map mode w/ you missing the map
authorWuzzy <Wuzzy2@mail.ru>
Sun, 18 Mar 2018 20:58:46 +0100
changeset 13250 0cc068e8a391
parent 13249 d2b58cf339fe
child 13251 edb2f654f8f6
Fix some map preview properly problems when host switches to image map mode w/ you missing the map
QTfrontend/ui/widget/mapContainer.cpp
--- a/QTfrontend/ui/widget/mapContainer.cpp	Sun Mar 18 15:42:17 2018 +0100
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Sun Mar 18 20:58:46 2018 +0100
@@ -524,6 +524,11 @@
         qDebug() << "HWMapContainer::intSetMap: Map doesn't exist: " << map;
         m_missingMap = true;
         lblMapName->setText(map);
+        if (m_mapInfo.type != MapModel::StaticMap && m_mapInfo.type != MapModel::MissionMap)
+        {
+            m_mapInfo.type = MapModel::StaticMap;
+            changeMapType(MapModel::StaticMap, QModelIndex());
+        }
         updatePreview();
     }
 }
@@ -934,6 +939,7 @@
             missionMapChanged(newMap.isValid() ? newMap : missionMapList->currentIndex());
             lblMapList->setText(tr("Mission:"));
             lblMapList->show();
+            lblMapName->setText(m_curMap);
             if(m_master)
             {
                 missionMapList->show();
@@ -953,6 +959,7 @@
             staticMapChanged(newMap.isValid() ? newMap : staticMapList->currentIndex());
             lblMapList->setText(tr("Map:"));
             lblMapList->show();
+            lblMapName->setText(m_curMap);
             if(m_master)
             {
                 staticMapList->show();
@@ -1127,7 +1134,6 @@
     }
 
     lblDesc->setText(mapInfo.desc);
-    lblMapName->setText(m_curMap);
 
     updatePreview();
     emit mapChanged(m_curMap);