Force proper map and theme reset when host delegates to you if you don't have the map or theme
--- a/QTfrontend/ui/widget/mapContainer.cpp Mon Mar 19 15:44:39 2018 +0100
+++ b/QTfrontend/ui/widget/mapContainer.cpp Mon Mar 19 16:07:08 2018 +0100
@@ -1229,11 +1229,24 @@
missionMapList->setVisible(master);
}
- if(m_missingMap)
+ if(master)
{
- // Force map type reset if host provided missing map
- m_missingMap = false;
- changeMapType(MapModel::GeneratedMap);
+ // Room delegation cleanup if we get room control.
+
+ if(m_missingMap)
+ {
+ // Force map type and theme reset we don't have the map
+ m_missingMap = false;
+ changeMapType(MapModel::GeneratedMap);
+ setRandomTheme();
+ }
+ else
+ {
+ // Set random theme if we don't have it
+ QModelIndexList mdl = m_themeModel->match(m_themeModel->index(0), ThemeModel::ActualNameRole, m_theme);
+ if(!mdl.size())
+ setRandomTheme();
+ }
}
}