Mercurial > hg > openttd
changeset 20590:48473b271f8a draft
(svn r25534) -Codechange: FinishInitNested calls OnResize, no need to setup scrollbar capacity before that.
author | frosch <frosch@openttd.org> |
---|---|
date | Sun, 30 Jun 2013 14:34:23 +0000 |
parents | 32521c1e0f03 |
children | 7eaf4b53c2d9 |
files | src/network/network_gui.cpp src/object_gui.cpp |
diffstat | 2 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -1354,7 +1354,6 @@ this->CreateNestedTree(); this->vscroll = this->GetScrollbar(WID_NL_SCROLLBAR); this->FinishInitNested(WN_NETWORK_WINDOW_LOBBY); - this->OnResize(); } CompanyID NetworkLobbyFindCompanyIndex(byte pos) const
--- a/src/object_gui.cpp +++ b/src/object_gui.cpp @@ -75,14 +75,12 @@ BuildObjectWindow(WindowDesc *desc, Window *w) : PickerWindowBase(desc, w), info_height(1) { this->CreateNestedTree(); + this->vscroll = this->GetScrollbar(WID_BO_SCROLLBAR); + this->FinishInitNested(0); - this->vscroll = this->GetScrollbar(WID_BO_SCROLLBAR); - this->vscroll->SetCapacity(5); this->vscroll->SetPosition(0); this->vscroll->SetCount(ObjectClass::GetUIClassCount()); - this->FinishInitNested(0); - if (this->CanRestoreSelectedObject()) { this->SelectOtherObject(_selected_object_index); } else {