diff options
| author | Rick Pasetto <rick@lindenlab.com> | 2009-12-21 11:54:27 -0800 |
|---|---|---|
| committer | Rick Pasetto <rick@lindenlab.com> | 2009-12-21 11:54:27 -0800 |
| commit | 7012b7e5a7b6fc4a1ff2e04713105eb56b4dc9ca (patch) | |
| tree | 8660484c9e23bf93623abf326f3d9b787b86f43d /indra/llui/lltextbase.cpp | |
| parent | fdaa7c3798efd070ac1f4ce707303f7f4ae89ea7 (diff) | |
| parent | c308dacfe26fa67e5871ba174dbc0c6cc545a6dd (diff) | |
Automated merge with ssh://richard@hg.lindenlab.com/james/gooey
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) { |
