Mercurial > hg > openttd
changeset 17910:71fa31ee7ee9 draft
(svn r22714) -Fix: If there's no point in opening the rail toolbar, don't open it for people who use hotkeys either rather than only for those using GUI elements
author | planetmaker <planetmaker@openttd.org> |
---|---|
date | Thu, 04 Aug 2011 14:04:15 +0000 |
parents | 4d6b4b6d6069 |
children | bffca9b7ed7f |
files | src/rail_gui.cpp |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -31,6 +31,7 @@ #include "core/geometry_func.hpp" #include "hotkeys.h" #include "engine_base.h" +#include "vehicle_func.h" #include "station_map.h" #include "tunnelbridge_map.h" @@ -849,6 +850,7 @@ EventState RailToolbarGlobalHotkeys(uint16 key, uint16 keycode) { + if (!CanBuildVehicleInfrastructure(VEH_TRAIN)) return ES_NOT_HANDLED; extern RailType _last_built_railtype; int num = CheckHotkeyMatch<BuildRailToolbarWindow>(_railtoolbar_hotkeys, keycode, NULL, true); if (num == -1) return ES_NOT_HANDLED;