(svn r10823) -Fix r8610 [FS#1097]: the autoreplace window vehicle count didn't always update correctly) (Matthias)

This commit is contained in:
bjarni
2007-08-07 23:07:10 +00:00
parent 106d5c3715
commit 495bc4ecf4
4 changed files with 5 additions and 5 deletions

View File

@@ -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]++;
}