summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorJonathan G Rennison <j.g.rennison@gmail.com>2020-01-06 20:31:57 +0000
committerCharles Pigott <charlespigott@googlemail.com>2020-01-12 19:37:43 +0000
commitf1734e7815653829d42ebd4def8c0d7d5aeae986 (patch)
treed87b30fd8f96bdb1fc9e5dfed8cfe7b854befbde /src/industry_cmd.cpp
parent22ba048c89c4b594a1bf18b4d0ea9e09f38e6dbc (diff)
downloadopenttd-f1734e7815653829d42ebd4def8c0d7d5aeae986.tar.xz
Change: Only resort industry directory window on production change if necessary
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 628e33557..6dce3c0ce 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -204,7 +204,7 @@ Industry::~Industry()
*/
void Industry::PostDestructor(size_t index)
{
- InvalidateWindowData(WC_INDUSTRY_DIRECTORY, 0, 0);
+ InvalidateWindowData(WC_INDUSTRY_DIRECTORY, 0, IDIWD_FORCE_REBUILD);
}
@@ -1900,7 +1900,7 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type,
if (GetIndustrySpec(i->type)->behaviour & INDUSTRYBEH_PLANT_ON_BUILT) {
for (uint j = 0; j != 50; j++) PlantRandomFarmField(i);
}
- InvalidateWindowData(WC_INDUSTRY_DIRECTORY, 0, 0);
+ InvalidateWindowData(WC_INDUSTRY_DIRECTORY, 0, IDIWD_FORCE_REBUILD);
if (!_generating_world) PopulateStationsNearby(i);
}
@@ -2829,7 +2829,7 @@ void IndustryDailyLoop()
cur_company.Restore();
/* production-change */
- InvalidateWindowData(WC_INDUSTRY_DIRECTORY, 0, 1);
+ InvalidateWindowData(WC_INDUSTRY_DIRECTORY, 0, IDIWD_PRODUCTION_CHANGE);
}
void IndustryMonthlyLoop()
@@ -2851,7 +2851,7 @@ void IndustryMonthlyLoop()
cur_company.Restore();
/* production-change */
- InvalidateWindowData(WC_INDUSTRY_DIRECTORY, 0, 1);
+ InvalidateWindowData(WC_INDUSTRY_DIRECTORY, 0, IDIWD_PRODUCTION_CHANGE);
}