From 6150edd3b4ec692ac8d56a872c99dfa72a54f3c9 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Wed, 29 Jun 2022 00:55:26 +0100 Subject: [PATCH] Fix Station industries_near incorrect after removing part moved sign RecomputeCatchment was being called before moving the sign tile instead of afterwards See: https://github.com/OpenTTD/OpenTTD/issues/9937 --- src/station_cmd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index e2421f3068..fc4ce1ee04 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -828,7 +828,6 @@ static void DeleteStationIfEmpty(BaseStation *st) void Station::AfterStationTileSetChange(bool adding, StationType type) { this->UpdateVirtCoord(); - this->RecomputeCatchment(); DirtyCompanyInfrastructureWindows(this->owner); if (adding) InvalidateWindowData(WC_STATION_LIST, this->owner, 0); @@ -849,10 +848,12 @@ void Station::AfterStationTileSetChange(bool adding, StationType type) } if (adding) { + this->RecomputeCatchment(); UpdateStationAcceptance(this, false); InvalidateWindowData(WC_SELECT_STATION, 0, 0); } else { DeleteStationIfEmpty(this); + this->RecomputeCatchment(); } }