summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-02-17 01:16:24 +0100
committerglx22 <glx22@users.noreply.github.com>2019-02-17 16:04:52 +0100
commitaadcf40b9b7f716fb53dc4fa41d7d484eeb2c7a5 (patch)
treee762191e1facafb55dfdc202a8cfac4550e66b33 /src
parent548ec05a48ba28b65e779fa27fa5985a4ee2901b (diff)
downloadopenttd-aadcf40b9b7f716fb53dc4fa41d7d484eeb2c7a5.tar.xz
Fix 1585eb1a3: wrong default selection for goals and story book
Diffstat (limited to 'src')
-rw-r--r--src/toolbar_gui.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp
index 9b84268ef..ce0ce58f5 100644
--- a/src/toolbar_gui.cpp
+++ b/src/toolbar_gui.cpp
@@ -218,7 +218,6 @@ static const int CTMN_SPECTATOR = -4; ///< Show a company window as spectator
* @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(Window *w, int widget, int grey = 0)
*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);
}