From a258833aeece66ad5904a110e49a5decebf34e66 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sat, 2 Dec 2023 21:46:43 +0000 Subject: [PATCH] Fix 67d071d: WC_STATION_LIST should be invalidated by owner, not station index. (#11530) --- src/economy.cpp | 4 ++-- src/station_cmd.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/economy.cpp b/src/economy.cpp index 53bd70c6a8..d168381465 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1933,8 +1933,8 @@ static void LoadUnloadVehicle(Vehicle *front) } if (dirty_station) { st->MarkTilesDirty(true); - SetWindowDirty(WC_STATION_VIEW, last_visited); - InvalidateWindowData(WC_STATION_LIST, last_visited); + SetWindowDirty(WC_STATION_VIEW, st->index); + InvalidateWindowData(WC_STATION_LIST, st->owner); } } diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 784b4bac37..0444a3feed 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -4055,7 +4055,7 @@ static uint UpdateStationWaiting(Station *st, CargoID type, uint amount, SourceT if (lg != nullptr) (*lg)[ge.node].UpdateSupply(amount); if (!ge.HasRating()) { - InvalidateWindowData(WC_STATION_LIST, st->index); + InvalidateWindowData(WC_STATION_LIST, st->owner); SetBit(ge.status, GoodsEntry::GES_RATING); }