(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
This commit is contained in:
@@ -61,9 +61,9 @@ static const NWidgetPart _nested_engine_preview_widgets[] = {
|
||||
struct EnginePreviewWindow : Window {
|
||||
static const int VEHICLE_SPACE = 40; // The space to show the vehicle image
|
||||
|
||||
EnginePreviewWindow(const WindowDesc *desc, WindowNumber window_number) : Window()
|
||||
EnginePreviewWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
|
||||
{
|
||||
this->InitNested(desc, window_number);
|
||||
this->InitNested(window_number);
|
||||
|
||||
/* There is no way to recover the window; so disallow closure via DEL; unless SHIFT+DEL */
|
||||
this->flags |= WF_STICKY;
|
||||
@@ -120,7 +120,7 @@ struct EnginePreviewWindow : Window {
|
||||
}
|
||||
};
|
||||
|
||||
static const WindowDesc _engine_preview_desc(
|
||||
static WindowDesc _engine_preview_desc(
|
||||
WDP_CENTER, 0, 0,
|
||||
WC_ENGINE_PREVIEW, WC_NONE,
|
||||
WDF_CONSTRUCTION,
|
||||
|
Reference in New Issue
Block a user