File diff r12968:8f3f0d6af8a6 → r12969:5e7f0342aa53
src/company_cmd.cpp
Show inline comments
 
@@ -66,14 +66,22 @@ Company::~Company()
 
	free(this->president_name);
 
	free(this->num_engines);
 

	
 
	if (CleaningPool()) return;
 

	
 
	DeleteCompanyWindows(this->index);
 
	InvalidateWindowData(WC_GRAPH_LEGEND, 0, this->index);
 
	InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, this->index);
 
}
 

	
 
/**
 
 * Invalidating some stuff after removing item from the pool.
 
 * @param index index of deleted item
 
 */
 
void Company::PostDestructor(size_t index)
 
{
 
	InvalidateWindowData(WC_GRAPH_LEGEND, 0, index);
 
	InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, index);
 
}
 

	
 
/**
 
 * Sets the local company and updates the settings that are set on a
 
 * per-company basis to reflect the core's state in the GUI.
 
 * @param new_company the new company