summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-02-10 16:35:22 -0800
committerRichard Linden <none@none>2012-02-10 16:35:22 -0800
commit6a6cf3aa78b328c5a4cb78ad1b4f9f2fb831c8e4 (patch)
tree5938c33eafa69e03d02a1ec0218261f136294c69 /indra/llui/lltextbase.cpp
parent45e30f35dc1a3dc07862ca9f67bbbdb238d364fe (diff)
EXP-1884 FIX Errors in navigating text when editing Landmarks and picks once a vertical scrollbar is shown
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--indra/llui/lltextbase.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 35abe48510..15c2d4946c 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1192,7 +1192,7 @@ void LLTextBase::reflow()
// shrink document to minimum size (visible portion of text widget)
// to force inlined widgets with follows set to shrink
- mDocumentView->reshape(mVisibleTextRect.getWidth(), mDocumentView->getRect().getHeight());
+ //mDocumentView->reshape(mVisibleTextRect.getWidth(), mDocumentView->getRect().getHeight());
S32 cur_top = 0;
@@ -2380,7 +2380,8 @@ S32 LLTextBase::getEditableIndex(S32 index, bool increasing_direction)
void LLTextBase::updateRects()
{
- mVisibleTextRect = getLocalRect();
+ LLRect old_text_rect = mVisibleTextRect;
+ mVisibleTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect();
if (mLineInfoList.empty())
{
@@ -2403,10 +2404,10 @@ void LLTextBase::updateRects()
switch(mVAlign)
{
case LLFontGL::TOP:
- delta_pos = llmax(mVisibleTextRect.mTop - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom);
+ delta_pos = llmax(mVisibleTextRect.getHeight() - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom);
break;
case LLFontGL::VCENTER:
- delta_pos = (llmax(mVisibleTextRect.mTop - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom) + (mVisibleTextRect.mBottom - mTextBoundingRect.mBottom)) / 2;
+ delta_pos = (llmax(mVisibleTextRect.getHeight() - mTextBoundingRect.mTop, -mTextBoundingRect.mBottom) + (mVisibleTextRect.mBottom - mTextBoundingRect.mBottom)) / 2;
break;
case LLFontGL::BOTTOM:
delta_pos = mVisibleTextRect.mBottom - mTextBoundingRect.mBottom;
@@ -2459,7 +2460,6 @@ void LLTextBase::updateRects()
//update mVisibleTextRect *after* mDocumentView has been resized
// so that scrollbars are added if document needs to scroll
// since mVisibleTextRect does not include scrollbars
- LLRect old_text_rect = mVisibleTextRect;
mVisibleTextRect = mScroller ? mScroller->getContentWindowRect() : getLocalRect();
//FIXME: replace border with image?
if (mBorderVisible)