# HG changeset patch # User glx # Date 2019-02-17 00:16:24 # Node ID 4a341df798c8177c18668b1b260f50738ff5fb1e # Parent 11315ee6c365ea5ac31fc9431fc4bdbc2388771e Fix 1585eb1a3: wrong default selection for goals and story book diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -218,7 +218,6 @@ static const int CTMN_SPECTATOR = -4; * @param w The toolbar window. * @param widget The button widget id. * @param grey A bitbask of which items to mark as disabled. - * @param include_spectator If true, a spectator option is included in the list. */ static void PopupMainCompanyToolbMenu(Window *w, int widget, int grey = 0) { @@ -254,7 +253,7 @@ static void PopupMainCompanyToolbMenu(Wi *list->Append() = new DropDownListCompanyItem(c, false, HasBit(grey, c)); } - PopupMainToolbMenu(w, widget, list, _local_company == COMPANY_SPECTATOR ? CTMN_CLIENT_LIST : (int)_local_company); + PopupMainToolbMenu(w, widget, list, _local_company == COMPANY_SPECTATOR ? (widget == WID_TN_COMPANIES ? CTMN_CLIENT_LIST : CTMN_SPECTATOR) : (int)_local_company); }