diff options
author | glx22 <glx@openttd.org> | 2021-05-17 15:46:38 +0200 |
---|---|---|
committer | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-05-29 21:08:25 +0200 |
commit | 5799402f7a4872d03809838dd7fa01db42bbd282 (patch) | |
tree | 6b54e235c14621035b4ec7923edb93980be5f056 /src/vehicle.cpp | |
parent | 994bf19aef3dde6c9482434bdc51688f76a937ea (diff) | |
download | openttd-5799402f7a4872d03809838dd7fa01db42bbd282.tar.xz |
Codechange: Rename window related DeleteXXX to match new behaviour
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 90accdd80..3c3125606 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -843,11 +843,11 @@ 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); + 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); SetWindowDirty(WC_COMPANY, this->owner); OrderBackup::ClearVehicle(this); } @@ -2795,7 +2795,7 @@ void Vehicle::RemoveFromShared() if (this->orders.list->GetNumVehicles() == 1) { /* When there is only one vehicle, remove the shared order list window. */ - DeleteWindowById(GetWindowClassForVehicleType(this->type), vli.Pack()); + CloseWindowById(GetWindowClassForVehicleType(this->type), vli.Pack()); InvalidateVehicleOrder(this->FirstShared(), VIWD_MODIFY_ORDERS); } else if (were_first) { /* If we were the first one, update to the new first one. |