diff options
author | Palmer Truelson <palmer@lindenlab.com> | 2009-12-22 14:06:48 -0600 |
---|---|---|
committer | Palmer Truelson <palmer@lindenlab.com> | 2009-12-22 14:06:48 -0600 |
commit | 616ca198143e7cc3f925add2c3b83aaf5d2fe244 (patch) | |
tree | a6f234275727009d196dbd6070753bcb02699bb0 /indra/llui/lltextbase.cpp | |
parent | 8f8e5c850a0574f30f9be1e3164531751139d2c5 (diff) | |
parent | e72a3c63ec44255172e253fe43e192918ec6117e (diff) |
Merge
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r-- | indra/llui/lltextbase.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index cb0907a771..e54032ac5e 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -962,7 +962,10 @@ void LLTextBase::draw() reflow(); // then update scroll position, as cursor may have moved - updateScrollFromCursor(); + if (!mReadOnly) + { + updateScrollFromCursor(); + } LLRect doc_rect; if (mScroller) @@ -1932,11 +1935,19 @@ void LLTextBase::endOfLine() void LLTextBase::startOfDoc() { setCursorPos(0); + if (mScroller) + { + mScroller->goToTop(); + } } void LLTextBase::endOfDoc() { setCursorPos(getLength()); + if (mScroller) + { + mScroller->goToBottom(); + } } void LLTextBase::changePage( S32 delta ) @@ -2001,6 +2012,16 @@ void LLTextBase::changeLine( S32 delta ) setCursorPos(new_cursor_pos, true); } +bool LLTextBase::scrolledToStart() +{ + return mScroller->isAtTop(); +} + +bool LLTextBase::scrolledToEnd() +{ + return mScroller->isAtBottom(); +} + bool LLTextBase::setCursor(S32 row, S32 column) { |