mirror of https://github.com/OpenTTD/OpenTTD
(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.
parent
9101d2e2d2
commit
5486e05f65
|
@ -380,7 +380,7 @@ void UpdateAllTownVirtCoords()
|
||||||
static void ChangePopulation(Town *t, int mod)
|
static void ChangePopulation(Town *t, int mod)
|
||||||
{
|
{
|
||||||
t->population += 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();
|
t->UpdateVirtCoord();
|
||||||
|
|
||||||
InvalidateWindowData(WC_TOWN_DIRECTORY, 0, 1);
|
InvalidateWindowData(WC_TOWN_DIRECTORY, 0, 1);
|
||||||
|
|
Loading…
Reference in New Issue