- fix map preview so it doesn't flicker

This commit is contained in:
Mark Vejvoda 2011-12-03 02:23:06 +00:00
parent 609bc528d2
commit 7b8c8195b0

View File

@ -2767,6 +2767,7 @@ void MenuStateConnectedGame::update() {
}
// FogOfWar
int originalFOWValue = listBoxFogOfWar.getSelectedItemIndex();
listBoxFogOfWar.setSelectedItemIndex(0); // default is 0!
if(gameSettings->getFogOfWar() == false){
listBoxFogOfWar.setSelectedItemIndex(2);
@ -2776,7 +2777,9 @@ void MenuStateConnectedGame::update() {
listBoxFogOfWar.setSelectedItemIndex(1);
}
}
cleanupMapPreviewTexture();
if(originalFOWValue != listBoxFogOfWar.getSelectedItemIndex()) {
cleanupMapPreviewTexture();
}
// Allow Observers
if(gameSettings->getAllowObservers()) {