summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp12
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.