summaryrefslogtreecommitdiff
path: root/indra/llui/llscrollcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llscrollcontainer.cpp')
-rw-r--r--indra/llui/llscrollcontainer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp
index 5e17372fe9..53c5a8d07d 100644
--- a/indra/llui/llscrollcontainer.cpp
+++ b/indra/llui/llscrollcontainer.cpp
@@ -584,8 +584,9 @@ LLRect LLScrollContainer::getVisibleContentRect()
return visible_rect;
}
-LLRect LLScrollContainer::getContentWindowRect() const
+LLRect LLScrollContainer::getContentWindowRect()
{
+ updateScroll();
LLRect scroller_view_rect;
S32 visible_width = 0;
S32 visible_height = 0;
@@ -625,7 +626,7 @@ void LLScrollContainer::scrollToShowRect(const LLRect& rect, const LLRect& const
rect_to_constrain.mTop - constraint.mTop);
// translate from allowable region for lower left corner to upper left corner
- allowable_scroll_rect.translate(0, content_window_rect.getHeight());
+ allowable_scroll_rect.translate(0, content_window_rect.getHeight() - 1);
S32 vert_pos = llclamp(mScrollbar[VERTICAL]->getDocPos(),
mScrollbar[VERTICAL]->getDocSize() - allowable_scroll_rect.mTop, // min vertical scroll