(svn r20545) -Codechange: make sure an OrderBackup gets cleared when the depot it belongs to gets removed, the depot window gets closed or when another vehicle gets sold in a depot

This commit is contained in:
rubidium
2010-08-18 18:52:16 +00:00
parent e242294530
commit 019878118d
6 changed files with 42 additions and 25 deletions

View File

@@ -11,6 +11,7 @@
#include "stdafx.h"
#include "depot_base.h"
#include "order_backup.h"
#include "order_func.h"
#include "window_func.h"
#include "core/pool_func.hpp"
@@ -31,6 +32,7 @@ Depot::~Depot()
/* Delete the depot-window */
DeleteWindowById(WC_VEHICLE_DEPOT, this->xy);
OrderBackup::Reset(this->xy);
/* Delete the depot list */
WindowNumber wno = (this->index << 16) | VLW_DEPOT_LIST | GetTileOwner(this->xy);