forked from mirror/OpenTTD
(svn r20541) -Fix: when removing a vehicle update the "clone orders of"-vehicle of a backed up order, or remove it if there is no vehicle sharing orders with that vehicle.
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#include "engine_base.h"
|
||||
#include "newgrf.h"
|
||||
#include "core/backup_type.hpp"
|
||||
#include "order_backup.h"
|
||||
|
||||
#include "table/sprites.h"
|
||||
#include "table/strings.h"
|
||||
@@ -674,6 +675,7 @@ void Vehicle::PreDestructor()
|
||||
DeleteWindowById(WC_VEHICLE_DETAILS, this->index);
|
||||
DeleteWindowById(WC_VEHICLE_TIMETABLE, this->index);
|
||||
SetWindowDirty(WC_COMPANY, this->owner);
|
||||
OrderBackup::ClearVehicle(this);
|
||||
}
|
||||
InvalidateWindowClassesData(GetWindowClassForVehicleType(this->type), 0);
|
||||
|
||||
|
Reference in New Issue
Block a user