From 76fb2e666cd2415e1c56ab13647d21ef6659b12d Mon Sep 17 00:00:00 2001 From: pelya Date: Sun, 16 Nov 2014 03:53:59 +0200 Subject: [PATCH] Hide all windows when placing airport --- src/airport_gui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index be04b00b8e..5924a4cc07 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -86,7 +86,7 @@ struct BuildAirToolbarWindow : Window { { switch (widget) { case WID_AT_AIRPORT: - if (HandlePlacePushButton(this, WID_AT_AIRPORT, SPR_CURSOR_AIRPORT, HT_RECT | HT_SCROLL_VIEWPORT)) { + if (HandlePlacePushButton(this, WID_AT_AIRPORT, SPR_CURSOR_AIRPORT, HT_RECT)) { ShowBuildAirportPicker(this); this->last_user_action = widget; } @@ -106,6 +106,7 @@ struct BuildAirToolbarWindow : Window { switch (this->last_user_action) { case WID_AT_AIRPORT: { VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_BUILD_STATION); + MoveAllWindowsOffScreen(); break; } @@ -128,6 +129,7 @@ struct BuildAirToolbarWindow : Window { switch (select_proc) { case DDSP_BUILD_STATION: assert(start_tile == end_tile); + MoveAllHiddenWindowsBackToScreen(); PlaceAirport(end_tile); break; case DDSP_DEMOLISH_AREA: