(svn r19955) -Fix: close list of vehicles with given buoy/oil rig in orders when switching company

This commit is contained in:
smatz
2010-06-10 23:27:37 +00:00
parent de50d914c8
commit 830e40af19
3 changed files with 12 additions and 28 deletions

View File

@@ -1277,7 +1277,12 @@ static WindowDesc _vehicle_list_desc(
static void ShowVehicleListWindowLocal(CompanyID company, uint16 VLW_flag, VehicleType vehicle_type, uint16 unique_number)
{
if (!Company::IsValidID(company)) return;
if (!Company::IsValidID(company)) {
_vehicle_list_desc.flags |= WDF_CONSTRUCTION;
company = _local_company;
} else {
_vehicle_list_desc.flags &= ~WDF_CONSTRUCTION;
}
_vehicle_list_desc.cls = GetWindowClassForVehicleType(vehicle_type);
WindowNumber num = (unique_number << 16) | (vehicle_type << 11) | VLW_flag | company;