From b01c75cb423f07a3d3354f8bd62f265f80062b3b Mon Sep 17 00:00:00 2001 From: Adam Moss Date: Thu, 16 Apr 2009 23:45:35 +0000 Subject: svn merge -r117314:117337 svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/mv13a-merge-1 QAR-1343 maint-viewer-13a+libcurlexploitfix-3-3 combo merge --- indra/llui/llscrolllistctrl.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/llui/llscrolllistctrl.cpp') diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 7b6c125eb1..5dd4e2d0ee 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -835,6 +835,12 @@ void LLScrollListCtrl::updateLayout() mItemListRect.mRight = getRect().getWidth() - mBorderThickness - SCROLLBAR_SIZE; } + // don't allow scrolling off bottom + if (mScrollLines + mPageLines > getItemCount()) + { + setScrollPos(llmax(0, getItemCount() - mPageLines)); + } + mScrollbar->reshape(SCROLLBAR_SIZE, mItemListRect.getHeight() + (mDisplayColumnHeaders ? mHeadingHeight : 0)); mScrollbar->setPageSize( mPageLines ); mScrollbar->setDocSize( getItemCount() ); @@ -2663,6 +2669,11 @@ void LLScrollListCtrl::scrollToShowSelected() return; } + if (needsSorting() && !isSorted()) + { + sortItems(); + } + S32 index = getFirstSelectedIndex(); if (index < 0) { -- cgit v1.2.3