From bca7d9e9ade2950c73313ffe8af83406149b9ba6 Mon Sep 17 00:00:00 2001 From: andy5995 Date: Sun, 4 Mar 2018 13:36:49 -0600 Subject: [PATCH] menu_state_custom_game:add condition Fixes disallowing switching cpu to another faction --- source/glest_game/menu/menu_state_custom_game.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index b4b1ad63e..f22ad4b19 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -4407,7 +4407,12 @@ namespace Glest listBoxControls[i].setEnabled (true); listBoxFactions[i].setEditable (true); listBoxTeams[i].setEditable (true); - listBoxFactions[i].setSelectedItemIndex (0); + + if (listBoxFactions[i].getSelectedItem () == + formatString (GameConstants::OBSERVER_SLOTNAME)) + { + listBoxFactions[i].setSelectedItemIndex (0); + } } else {