mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Update town sign on population change only when population is shown (#7368)
parent
776fbda324
commit
dea7f078f4
|
@ -423,7 +423,7 @@ static void ChangePopulation(Town *t, int mod)
|
||||||
{
|
{
|
||||||
t->cache.population += mod;
|
t->cache.population += mod;
|
||||||
InvalidateWindowData(WC_TOWN_VIEW, t->index); // Cargo requirements may appear/vanish for small populations
|
InvalidateWindowData(WC_TOWN_VIEW, t->index); // Cargo requirements may appear/vanish for small populations
|
||||||
t->UpdateVirtCoord();
|
if (_settings_client.gui.population_in_label) t->UpdateVirtCoord();
|
||||||
|
|
||||||
InvalidateWindowData(WC_TOWN_DIRECTORY, 0, 1);
|
InvalidateWindowData(WC_TOWN_DIRECTORY, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue