diff options
author | frosch <frosch@openttd.org> | 2013-06-30 14:34:23 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-06-30 14:34:23 +0000 |
commit | df732f2bae50510799e072ed10ac658711ed4907 (patch) | |
tree | 3c5581c6b3284dc8882d88e29c7c722d128bd149 /src/object_gui.cpp | |
parent | e184b9799cd855eadfae0863a5a7930168535c89 (diff) | |
download | openttd-df732f2bae50510799e072ed10ac658711ed4907.tar.xz |
(svn r25534) -Codechange: FinishInitNested calls OnResize, no need to setup scrollbar capacity before that.
Diffstat (limited to 'src/object_gui.cpp')
-rw-r--r-- | src/object_gui.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/object_gui.cpp b/src/object_gui.cpp index b27388313..e4287c7ac 100644 --- a/src/object_gui.cpp +++ b/src/object_gui.cpp @@ -75,14 +75,12 @@ public: BuildObjectWindow(WindowDesc *desc, Window *w) : PickerWindowBase(desc, w), info_height(1) { this->CreateNestedTree(); - this->vscroll = this->GetScrollbar(WID_BO_SCROLLBAR); - this->vscroll->SetCapacity(5); + this->FinishInitNested(0); + this->vscroll->SetPosition(0); this->vscroll->SetCount(ObjectClass::GetUIClassCount()); - this->FinishInitNested(0); - if (this->CanRestoreSelectedObject()) { this->SelectOtherObject(_selected_object_index); } else { |