Recreate map editor screen when changing ruleset to update all the editing tools

This commit is contained in:
yairm210
2021-11-19 15:20:28 +02:00
parent ea29458038
commit ea0738f6e5

View File

@ -170,9 +170,11 @@ class MapEditorMenuPopup(var mapEditorScreen: MapEditorScreen): Popup(mapEditorS
ruleset.modOptions = newRuleset.modOptions
mapEditorScreen.tileMap.removeMissingTerrainModReferences(ruleset)
mapEditorScreen.mapHolder.updateTileGroups()
ImageGetter.setNewRuleset(ruleset)
// Recreate screen, since the improvementss, nations etc. could be outdated
mapEditorScreen.game.setScreen(MapEditorScreen(mapEditorScreen.tileMap))
}
}