mirror of https://github.com/OpenTTD/OpenTTD
(svn r25534) -Codechange: FinishInitNested calls OnResize, no need to setup scrollbar capacity before that.
parent
e184b9799c
commit
df732f2bae
|
@ -1354,7 +1354,6 @@ struct NetworkLobbyWindow : public Window {
|
||||||
this->CreateNestedTree();
|
this->CreateNestedTree();
|
||||||
this->vscroll = this->GetScrollbar(WID_NL_SCROLLBAR);
|
this->vscroll = this->GetScrollbar(WID_NL_SCROLLBAR);
|
||||||
this->FinishInitNested(WN_NETWORK_WINDOW_LOBBY);
|
this->FinishInitNested(WN_NETWORK_WINDOW_LOBBY);
|
||||||
this->OnResize();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CompanyID NetworkLobbyFindCompanyIndex(byte pos) const
|
CompanyID NetworkLobbyFindCompanyIndex(byte pos) const
|
||||||
|
|
|
@ -75,14 +75,12 @@ public:
|
||||||
BuildObjectWindow(WindowDesc *desc, Window *w) : PickerWindowBase(desc, w), info_height(1)
|
BuildObjectWindow(WindowDesc *desc, Window *w) : PickerWindowBase(desc, w), info_height(1)
|
||||||
{
|
{
|
||||||
this->CreateNestedTree();
|
this->CreateNestedTree();
|
||||||
|
|
||||||
this->vscroll = this->GetScrollbar(WID_BO_SCROLLBAR);
|
this->vscroll = this->GetScrollbar(WID_BO_SCROLLBAR);
|
||||||
this->vscroll->SetCapacity(5);
|
this->FinishInitNested(0);
|
||||||
|
|
||||||
this->vscroll->SetPosition(0);
|
this->vscroll->SetPosition(0);
|
||||||
this->vscroll->SetCount(ObjectClass::GetUIClassCount());
|
this->vscroll->SetCount(ObjectClass::GetUIClassCount());
|
||||||
|
|
||||||
this->FinishInitNested(0);
|
|
||||||
|
|
||||||
if (this->CanRestoreSelectedObject()) {
|
if (this->CanRestoreSelectedObject()) {
|
||||||
this->SelectOtherObject(_selected_object_index);
|
this->SelectOtherObject(_selected_object_index);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue