Fix #10335: Set initial scrollbar count for object GUI. (#10336)

This previously happened when the window was resized by itself which was fixed by #10196. Explicitly set the count instead.
pull/474/head
PeterN 1 year ago committed by GitHub
parent 70157b2ad5
commit 09a32f2ce1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -119,6 +119,7 @@ public:
NWidgetMatrix *matrix = this->GetWidget<NWidgetMatrix>(WID_BO_SELECT_MATRIX);
matrix->SetScrollbar(this->GetScrollbar(WID_BO_SELECT_SCROLL));
matrix->SetCount(ObjectClass::Get(_selected_object_class)->GetUISpecCount());
this->GetWidget<NWidgetMatrix>(WID_BO_OBJECT_MATRIX)->SetCount(4);

Loading…
Cancel
Save