If delegating room control, reset map of new master, if map is missing
authorWuzzy <Wuzzy2@mail.ru>
Thu, 22 Mar 2018 16:08:33 +0100
changeset 13266 df1db657bbb4
parent 13265 8a5feb0edce5
child 13267 48b23e6f26d9
If delegating room control, reset map of new master, if map is missing
QTfrontend/ui/widget/mapContainer.cpp
--- a/QTfrontend/ui/widget/mapContainer.cpp	Thu Mar 22 14:09:10 2018 +0100
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Thu Mar 22 16:08:33 2018 +0100
@@ -1269,10 +1269,20 @@
 
         if(m_missingMap)
         {
-            // Force map type and theme reset we don't have the map
+            // Reset map if we don't have the host's map
             m_missingMap = false;
-            changeMapType(MapModel::GeneratedMap);
-            setRandomTheme();
+            if(m_mapInfo.type == MapModel::MissionMap)
+            {
+                missionMapList->selectionModel()->setCurrentIndex(m_missionMapModel->index(0, 0), QItemSelectionModel::Clear | QItemSelectionModel::SelectCurrent);
+            }
+            else
+            {
+                if(m_mapInfo.type != MapModel::StaticMap)
+                {
+                    changeMapType(MapModel::StaticMap);
+                }
+                staticMapList->selectionModel()->setCurrentIndex(m_staticMapModel->index(0, 0), QItemSelectionModel::Clear | QItemSelectionModel::SelectCurrent);
+            }
         }
         else
         {