diff options
Diffstat (limited to 'rail_cmd.c')
-rw-r--r-- | rail_cmd.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 877dec669..ac1c0ec49 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -888,14 +888,9 @@ static int32 DoConvertRail(TileIndex tile, RailType totype, bool exec) if (IsTileDepotType(tile, TRANSPORT_RAIL)) { Vehicle *v; - Window *w; /* Update build vehicle window related to this depot */ - w = FindWindowById(WC_BUILD_VEHICLE, tile); - if (w != NULL) { - WP(w,buildvehicle_d).railtype = totype; - SetWindowDirty(w); - } + InvalidateWindowData(WC_BUILD_VEHICLE, tile); /* update power of trains in this depot */ FOR_ALL_VEHICLES(v) { |