Fixed dropdown list missing items

This commit is contained in:
Sergii Pylypenko
2019-09-02 22:50:26 +03:00
committed by pelya
parent 17ee6fa299
commit 070f1ddf4f

View File

@@ -154,6 +154,9 @@ struct DropdownWindow : Window {
/* Capacity is the average number of items visible */
this->vscroll->SetCapacity(size.height * (uint16)list->Length() / list_height);
this->vscroll->SetCount((uint16)list->Length());
if (this->vscroll->GetCount() <= this->vscroll->GetCapacity()) {
scroll_pos = 0;
}
this->vscroll->SetPosition(scroll_pos);
this->vscroll->UpdatePosition(0);