Fixed joining stations, broken by confirmation dialog

This commit is contained in:
pelya
2016-05-18 09:37:38 +03:00
committed by Sergii Pylypenko
parent ff28829393
commit a724419cc9
5 changed files with 14 additions and 5 deletions

View File

@@ -29,6 +29,7 @@
#include "vehicle_func.h"
#include "gui.h"
#include "command_func.h"
#include "build_confirmation_func.h"
#include "widgets/airport_widget.h"
@@ -157,8 +158,10 @@ struct BuildAirToolbarWindow : Window {
{
MoveAllHiddenWindowsBackToScreen();
this->RaiseButtons();
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_AIR);
DeleteWindowById(WC_SELECT_STATION, 0);
if (!ConfirmationWindowShown()) {
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_AIR);
DeleteWindowById(WC_SELECT_STATION, 0);
}
ResetObjectToPlace();
}