From 7b8c8195b042ef12240b0306e7e6280d3837a92d Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 3 Dec 2011 02:23:06 +0000 Subject: [PATCH] - fix map preview so it doesn't flicker --- source/glest_game/menu/menu_state_connected_game.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index a4cda7ca..43bdee69 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -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()) {