(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:
rubidium
2010-08-18 15:58:30 +00:00
parent d28985fe8e
commit 287ee8c01d
3 changed files with 31 additions and 11 deletions

View File

@@ -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);