From 51fca5eec7a5ad6a765c5f1871e5539b33bc24d7 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 9 Dec 2012 16:55:38 +0000 Subject: (svn r24812) -Fix: Close pending preview windows when the engine is introduced to everyone. --- src/engine.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/engine.cpp b/src/engine.cpp index 782f3f31a..3cb6d4bfb 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -924,6 +924,9 @@ static void NewVehicleAvailable(Engine *e) /* 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. */ -- cgit v1.2.3-70-g09d2