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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index eab077ad6..d604d633d 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -588,7 +588,7 @@ static CommandCost CmdBuildRailWagon(EngineID engine, TileIndex tile, uint32 fla
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
if (IsLocalPlayer()) {
- InvalidateAutoreplaceWindow(VEH_TRAIN, v->group_id); // updates the replace Train window
+ InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Train window
}
GetPlayer(_current_player)->num_engines[engine]++;
}
@@ -772,7 +772,7 @@ CommandCost CmdBuildRailVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32
RebuildVehicleLists();
InvalidateWindow(WC_COMPANY, v->owner);
if (IsLocalPlayer())
- InvalidateAutoreplaceWindow(VEH_TRAIN, v->group_id); // updates the replace Train window
+ InvalidateAutoreplaceWindow(v->engine_type, v->group_id); // updates the replace Train window
GetPlayer(_current_player)->num_engines[p1]++;
}