Changeset - r19857:9f4c2d0ff736
[Not reviewed]
master
0 1 0
frosch - 12 years ago 2012-12-09 16:55:38
frosch@openttd.org
(svn r24812) -Fix: Close pending preview windows when the engine is introduced to everyone.
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/engine.cpp
Show inline comments
 
@@ -921,12 +921,15 @@ static void NewVehicleAvailable(Engine *
 
		AddNewsItem(STR_NEWS_NEW_VEHICLE_NOW_AVAILABLE_WITH_TYPE, NT_NEW_VEHICLES, NF_VEHICLE, NR_ENGINE, index);
 
	}
 

	
 
	/* Update the toolbar. */
 
	if (e->type == VEH_ROAD) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_ROAD);
 
	if (e->type == VEH_SHIP) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_WATER);
 

	
 
	/* Close pending preview windows */
 
	DeleteWindowById(WC_ENGINE_PREVIEW, index);
 
}
 

	
 
/** Monthly update of the availability, reliability, and preview offers of the engines. */
 
void EnginesMonthlyLoop()
 
{
 
	if (_cur_year < _year_engine_aging_stops) {
0 comments (0 inline, 0 general)