(svn r24811) -Add: Close engine preview window when another client accepts it.

This commit is contained in:
frosch
2012-12-09 16:55:21 +00:00
parent 0e4b212c45
commit 5c358c4173
2 changed files with 15 additions and 0 deletions

View File

@@ -110,6 +110,14 @@ struct EnginePreviewWindow : Window {
break;
}
}
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
{
if (!gui_scope) return;
EngineID engine = this->window_number;
if (Engine::Get(engine)->preview_company != _local_company) delete this;
}
};
static const WindowDesc _engine_preview_desc(