Merge branch 'master' into jgrpp

# Conflicts:
#	src/company_cmd.cpp
#	src/console_cmds.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/screenshot.cpp
#	src/settings_gui.cp
This commit is contained in:
Jonathan G Rennison
2022-11-10 19:46:02 +00:00
66 changed files with 170 additions and 132 deletions

View File

@@ -120,8 +120,11 @@ void SetLocalCompany(CompanyID new_company)
_current_company = _local_company = new_company;
/* Delete any construction windows... */
if (switching_company) DeleteConstructionWindows();
if (switching_company) {
InvalidateWindowClassesData(WC_COMPANY);
/* Delete any construction windows... */
DeleteConstructionWindows();
}
if (switching_company && Company::IsValidID(new_company)) {
for (Town *town : Town::Iterate()) {
@@ -948,8 +951,6 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
DEBUG(desync, 1, "delete_company: date{%08x; %02x; %02x}, company_id: %u, reason: %u", _date, _date_fract, _tick_skip_counter, company_id, reason);
/* Delete any open window of the company */
DeleteCompanyWindows(c->index);
CompanyNewsInformation *cni = new CompanyNewsInformation(c);
/* Show the bankrupt news */