(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.

This commit is contained in:
frosch
2013-05-26 19:23:42 +00:00
parent b10a4f151a
commit 56e4a8c4d6
61 changed files with 488 additions and 482 deletions

View File

@@ -72,16 +72,16 @@ class BuildObjectWindow : public PickerWindowBase {
}
public:
BuildObjectWindow(const WindowDesc *desc, Window *w) : PickerWindowBase(w), info_height(1)
BuildObjectWindow(WindowDesc *desc, Window *w) : PickerWindowBase(desc, w), info_height(1)
{
this->CreateNestedTree(desc);
this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_BO_SCROLLBAR);
this->vscroll->SetCapacity(5);
this->vscroll->SetPosition(0);
this->vscroll->SetCount(ObjectClass::GetUIClassCount());
this->FinishInitNested(desc, 0);
this->FinishInitNested(0);
if (this->CanRestoreSelectedObject()) {
this->SelectOtherObject(_selected_object_index);
@@ -488,7 +488,7 @@ static const NWidgetPart _nested_build_object_widgets[] = {
EndContainer(),
};
static const WindowDesc _build_object_desc(
static WindowDesc _build_object_desc(
WDP_AUTO, 0, 0,
WC_BUILD_OBJECT, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION,