Fix cases where departures board data was not invalidated

This commit is contained in:
Jonathan G Rennison
2020-03-09 08:51:15 +00:00
parent 749b9da602
commit cb6a01cab3
7 changed files with 21 additions and 0 deletions

View File

@@ -2441,6 +2441,7 @@ void DeleteVehicleOrders(Vehicle *v, bool keep_orderlist, bool reset_order_indic
v->orders.list = nullptr;
} else {
DeleteWindowById(GetWindowClassForVehicleType(v->type), VehicleListIdentifier(VL_SHARED_ORDERS, v->type, v->owner, v->index).Pack());
InvalidateWindowClassesData(WC_DEPARTURES_BOARD, 0);
if (v->orders.list != nullptr) {
/* Remove the orders */
v->orders.list->FreeChain(keep_orderlist);