Fix town label colour not being updated when switching companies

This commit is contained in:
Jonathan G Rennison
2020-09-09 01:01:23 +01:00
parent 11a9a4dc0c
commit 75d53525d2

View File

@@ -117,6 +117,12 @@ void SetLocalCompany(CompanyID new_company)
/* Delete any construction windows... */ /* Delete any construction windows... */
if (switching_company) DeleteConstructionWindows(); if (switching_company) DeleteConstructionWindows();
if (switching_company && Company::IsValidID(new_company)) {
for (Town *town : Town::Iterate()) {
town->UpdateLabel();
}
}
/* ... and redraw the whole screen. */ /* ... and redraw the whole screen. */
MarkWholeScreenDirty(); MarkWholeScreenDirty();
InvalidateWindowClassesData(WC_SIGN_LIST, -1); InvalidateWindowClassesData(WC_SIGN_LIST, -1);