From 56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 26 May 2013 19:23:42 +0000 Subject: (svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction. --- src/order_gui.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/order_gui.cpp') diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 2e9a7fb16..04fb155d0 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -793,13 +793,13 @@ private: } public: - OrdersWindow(const WindowDesc *desc, const Vehicle *v) : Window() + OrdersWindow(WindowDesc *desc, const Vehicle *v) : Window(desc) { this->vehicle = v; - this->CreateNestedTree(desc); + this->CreateNestedTree(); this->vscroll = this->GetScrollbar(WID_O_SCROLLBAR); - this->FinishInitNested(desc, v->index); + this->FinishInitNested(v->index); if (v->owner == _local_company) { this->DisableWidget(WID_O_EMPTY); } @@ -1593,7 +1593,7 @@ static const NWidgetPart _nested_orders_train_widgets[] = { EndContainer(), }; -static const WindowDesc _orders_train_desc( +static WindowDesc _orders_train_desc( WDP_AUTO, 384, 100, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, WDF_CONSTRUCTION, @@ -1664,7 +1664,7 @@ static const NWidgetPart _nested_orders_widgets[] = { EndContainer(), }; -static const WindowDesc _orders_desc( +static WindowDesc _orders_desc( WDP_AUTO, 384, 100, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, WDF_CONSTRUCTION, @@ -1689,7 +1689,7 @@ static const NWidgetPart _nested_other_orders_widgets[] = { EndContainer(), }; -static const WindowDesc _other_orders_desc( +static WindowDesc _other_orders_desc( WDP_AUTO, 384, 86, WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW, WDF_CONSTRUCTION, -- cgit v1.2.3-54-g00ecf