changeset 19879:fc6003f86e35 draft

(svn r24812) -Fix: Close pending preview windows when the engine is introduced to everyone.
author frosch <frosch@openttd.org>
date Sun, 09 Dec 2012 16:55:38 +0000
parents 547bdf50d651
children 2168a584b026
files src/engine.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -924,6 +924,9 @@
 	/* 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. */