From 5322d33ca50eb9656ecb74b0bb8a0601949d40a3 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) (cherry picked from commit a258833aeece66ad5904a110e49a5decebf34e66) --- 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 de1c5e03f6..a57de5964e 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -2395,8 +2395,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 d5006af352..8e2a0b6b47 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -4708,7 +4708,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); }