From 971083415c97b5a5c589c214f529ec436ecdcacd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 18 Aug 2019 16:20:26 -0400 Subject: [PATCH] This should fix Nai's issue, maybe? --- indra/llui/llscrolllistctrl.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 2acdb5e02..cea715fa9 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1426,9 +1426,6 @@ void LLScrollListCtrl::drawItems() S32 x = mItemListRect.mLeft; S32 y = mItemListRect.mTop - mLineHeight; - // allow for partial line at bottom - S32 num_page_lines = getLinesPerPage(); - LLRect item_rect; LLGLSUIDefault gls_ui; @@ -1453,6 +1450,9 @@ void LLScrollListCtrl::drawItems() return; } S32 list_size = mItemList.size() - 1; + + // allow for partial line at bottom + S32 num_page_lines = mFilter.empty() ? getLinesPerPage() : mScrollbar->getDocSize() + 1; S32 last_line = llmin(list_size, mScrollLines + num_page_lines); S32 max_columns = 0; @@ -2441,8 +2441,7 @@ S32 LLScrollListCtrl::getLinesPerPage() } else { - return mLineHeight ? mItemListRect.getHeight() / mLineHeight : - mFilter.empty() ? getItemCount() : mScrollbar->getDocSize(); + return mLineHeight ? mItemListRect.getHeight() / mLineHeight : getItemCount(); } }