(svn r22716) -Fix: Murphy is a bitch

This commit is contained in:
planetmaker 2011-08-04 17:22:18 +00:00
parent d20b5eb915
commit ad254f2b7c
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,6 @@ struct BuildAirToolbarWindow : Window {
virtual EventState OnKeyPress(uint16 key, uint16 keycode)
{
if (!CanBuildVehicleInfrastructure(VEH_AIRCRAFT)) return ES_NOT_HANDLED;
int num = CheckHotkeyMatch(airtoolbar_hotkeys, keycode, this);
if (num == -1) return ES_NOT_HANDLED;
this->OnClick(Point(), num, 1);
@ -197,6 +196,7 @@ Window *ShowBuildAirToolbar()
EventState AirportToolbarGlobalHotkeys(uint16 key, uint16 keycode)
{
if (!CanBuildVehicleInfrastructure(VEH_AIRCRAFT)) return ES_NOT_HANDLED;
int num = CheckHotkeyMatch<BuildAirToolbarWindow>(_airtoolbar_hotkeys, keycode, NULL, true);
if (num == -1) return ES_NOT_HANDLED;
Window *w = ShowBuildAirToolbar();