1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-28 22:54:29 +01:00

Codechange: Use proper widget type and update widgets properly (#14870)

For vehicle window.
This commit is contained in:
Cyprian Klimaszewski
2026-01-08 23:31:00 +01:00
committed by GitHub
parent 52d6a579e5
commit d405e4cb09
5 changed files with 25 additions and 20 deletions

View File

@@ -212,7 +212,7 @@ uint16_t Order::MapOldOrder() const
*/
void InvalidateVehicleOrder(const Vehicle *v, int data)
{
SetWindowDirty(WC_VEHICLE_VIEW, v->index);
InvalidateWindowData(WC_VEHICLE_VIEW, v->index);
if (data != 0) {
/* Calls SetDirty() too */
@@ -1761,7 +1761,7 @@ void RemoveOrderFromAllVehicles(OrderType type, DestinationID destination, bool
if ((v->type == VEH_AIRCRAFT && v->current_order.IsType(OT_GOTO_DEPOT) && !hangar ? OT_GOTO_STATION : v->current_order.GetType()) == type &&
(!hangar || v->type == VEH_AIRCRAFT) && v->current_order.GetDestination() == destination) {
v->current_order.MakeDummy();
SetWindowDirty(WC_VEHICLE_VIEW, v->index);
InvalidateWindowData(WC_VEHICLE_VIEW, v->index);
}
if (v->orders == nullptr) continue;