summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-12-09 16:55:38 +0000
committerfrosch <frosch@openttd.org>2012-12-09 16:55:38 +0000
commit51fca5eec7a5ad6a765c5f1871e5539b33bc24d7 (patch)
tree512b8dc04f9a9f3ea8ca6a827336930bb7b819d1 /src
parent5c358c41735e95d14eb23667e146c10e2cea9b67 (diff)
downloadopenttd-51fca5eec7a5ad6a765c5f1871e5539b33bc24d7.tar.xz
(svn r24812) -Fix: Close pending preview windows when the engine is introduced to everyone.
Diffstat (limited to 'src')
-rw-r--r--src/engine.cpp3
1 files changed, 3 insertions, 0 deletions
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. */