Rename close window functions to match upstream

This commit is contained in:
Jonathan G Rennison
2023-09-15 20:59:08 +01:00
parent ed1b842ad3
commit a18f3274b4
75 changed files with 291 additions and 299 deletions

View File

@@ -1209,14 +1209,14 @@ void Vehicle::PreDestructor()
}
if (this->IsPrimaryVehicle()) {
DeleteWindowById(WC_VEHICLE_VIEW, this->index);
DeleteWindowById(WC_VEHICLE_ORDERS, this->index);
DeleteWindowById(WC_VEHICLE_REFIT, this->index);
DeleteWindowById(WC_VEHICLE_DETAILS, this->index);
DeleteWindowById(WC_VEHICLE_TIMETABLE, this->index);
DeleteWindowById(WC_SCHDISPATCH_SLOTS, this->index);
DeleteWindowById(WC_VEHICLE_CARGO_TYPE_LOAD_ORDERS, this->index);
DeleteWindowById(WC_VEHICLE_CARGO_TYPE_UNLOAD_ORDERS, this->index);
CloseWindowById(WC_VEHICLE_VIEW, this->index);
CloseWindowById(WC_VEHICLE_ORDERS, this->index);
CloseWindowById(WC_VEHICLE_REFIT, this->index);
CloseWindowById(WC_VEHICLE_DETAILS, this->index);
CloseWindowById(WC_VEHICLE_TIMETABLE, this->index);
CloseWindowById(WC_SCHDISPATCH_SLOTS, this->index);
CloseWindowById(WC_VEHICLE_CARGO_TYPE_LOAD_ORDERS, this->index);
CloseWindowById(WC_VEHICLE_CARGO_TYPE_UNLOAD_ORDERS, this->index);
SetWindowDirty(WC_COMPANY, this->owner);
OrderBackup::ClearVehicle(this);
}
@@ -4211,7 +4211,7 @@ void Vehicle::RemoveFromShared()
if (this->orders->GetNumVehicles() == 1 && !_settings_client.gui.enable_single_veh_shared_order_gui) {
/* When there is only one vehicle, remove the shared order list window. */
DeleteWindowById(GetWindowClassForVehicleType(this->type), vli.Pack());
CloseWindowById(GetWindowClassForVehicleType(this->type), vli.Pack());
} else if (were_first) {
/* If we were the first one, update to the new first one.
* Note: FirstShared() is already the new first */