summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorrichard <none@none>2009-12-07 15:34:19 -0800
committerrichard <none@none>2009-12-07 15:34:19 -0800
commit3cf11892e430217dc4bf3b64d650e6316242c9c2 (patch)
treed5b4d5d94e5557d6e1de1e5c6c7fae97d57a2a2d /indra
parenta162a8de977de373b451b93b0ce3617cdbe59a39 (diff)
fix for horizontal scrolling in text_editors
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lltextbase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 741ab1737d..c1b3b8b2a7 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2097,7 +2097,7 @@ void LLTextBase::updateRects()
LLRect doc_rect = mContentsRect;
// use old mTextRect constraint document to width of viewable region
doc_rect.mLeft = 0;
- doc_rect.mRight = mTextRect.getWidth();
+ doc_rect.mRight = llmax(mTextRect.getWidth(), mContentsRect.mRight);
mDocumentView->setShape(doc_rect);
@@ -2117,7 +2117,7 @@ void LLTextBase::updateRects()
}
// update document container again, using new mTextRect
- doc_rect.mRight = doc_rect.mLeft + mTextRect.getWidth();
+ doc_rect.mRight = llmax(mTextRect.getWidth(), mContentsRect.mRight);
mDocumentView->setShape(doc_rect);
}