summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-02-15 21:34:58 +0000
committerfrosch <frosch@openttd.org>2012-02-15 21:34:58 +0000
commit5486e05f65a3fb552a214878fd15f984c7440426 (patch)
treec6fddff1e68bd129c107b7004212c3809167ce15
parent9101d2e2d2d6c80506f089d6dae418a8c4b9257c (diff)
downloadopenttd-5486e05f65a3fb552a214878fd15f984c7440426.tar.xz
(svn r23953) -Fix [FS#5062]: When the population of a town changes the town view might even have to change size due to different cargo requirements.
-rw-r--r--src/town_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 986000b2d..87b55146a 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -380,7 +380,7 @@ void UpdateAllTownVirtCoords()
static void ChangePopulation(Town *t, int mod)
{
t->population += mod;
- SetWindowDirty(WC_TOWN_VIEW, t->index);
+ InvalidateWindowData(WC_TOWN_VIEW, t->index); // Cargo requirements may appear/vanish for small populations
t->UpdateVirtCoord();
InvalidateWindowData(WC_TOWN_DIRECTORY, 0, 1);