Fixed joining stations, broken by confirmation dialog
This commit is contained in:
@@ -771,12 +771,13 @@ struct BuildRailToolbarWindow : Window {
|
||||
this->DisableWidget(WID_RAT_REMOVE);
|
||||
this->SetWidgetDirty(WID_RAT_REMOVE);
|
||||
|
||||
if (ConfirmationWindowShown()) return;
|
||||
DeleteWindowById(WC_BUILD_SIGNAL, TRANSPORT_RAIL);
|
||||
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_RAIL);
|
||||
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_RAIL);
|
||||
DeleteWindowById(WC_BUILD_WAYPOINT, TRANSPORT_RAIL);
|
||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||
if (!ConfirmationWindowShown()) DeleteWindowByClass(WC_BUILD_BRIDGE);
|
||||
DeleteWindowByClass(WC_BUILD_BRIDGE);
|
||||
}
|
||||
|
||||
virtual void SelectLastTool()
|
||||
@@ -934,6 +935,7 @@ static void HandleStationPlacement(TileIndex start, TileIndex end)
|
||||
uint32 p2 = _railstation.station_class | _railstation.station_type << 8 | INVALID_STATION << 16;
|
||||
|
||||
CommandContainer cmdcont = { ta.tile, p1, p2, CMD_BUILD_RAIL_STATION | CMD_MSG(STR_ERROR_CAN_T_BUILD_RAILROAD_STATION), CcStation, "" };
|
||||
printf("Rail station ctrl pressed %d\n", _ctrl_pressed);
|
||||
ShowSelectStationIfNeeded(cmdcont, ta);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user