summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 77ffa0161..47895122b 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -1293,11 +1293,11 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, u
*/
if (src == original_src_head && src->IsEngine() && !src->IsFrontEngine()) {
/* Cases #2 and #3: the front engine gets trashed. */
- DeleteWindowById(WC_VEHICLE_VIEW, src->index);
- DeleteWindowById(WC_VEHICLE_ORDERS, src->index);
- DeleteWindowById(WC_VEHICLE_REFIT, src->index);
- DeleteWindowById(WC_VEHICLE_DETAILS, src->index);
- DeleteWindowById(WC_VEHICLE_TIMETABLE, src->index);
+ CloseWindowById(WC_VEHICLE_VIEW, src->index);
+ CloseWindowById(WC_VEHICLE_ORDERS, src->index);
+ CloseWindowById(WC_VEHICLE_REFIT, src->index);
+ CloseWindowById(WC_VEHICLE_DETAILS, src->index);
+ CloseWindowById(WC_VEHICLE_TIMETABLE, src->index);
DeleteNewGRFInspectWindow(GSF_TRAINS, src->index);
SetWindowDirty(WC_COMPANY, _current_company);