# HG changeset patch # User frosch # Date 2012-12-09 16:55:38 # Node ID 9f4c2d0ff736118e5aaac803e3b19e81141b430c # Parent 877797b48845c529ff4f6b655e028596569ad1c8 (svn r24812) -Fix: Close pending preview windows when the engine is introduced to everyone. diff --git a/src/engine.cpp b/src/engine.cpp --- a/src/engine.cpp +++ b/src/engine.cpp @@ -924,6 +924,9 @@ static void NewVehicleAvailable(Engine * /* 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. */