diff options
| author | angela <angela@lindenlab.com> | 2009-11-24 11:55:12 +0800 |
|---|---|---|
| committer | angela <angela@lindenlab.com> | 2009-11-24 11:55:12 +0800 |
| commit | f27aff450fd394dc53c7160d58df40037d57c774 (patch) | |
| tree | 3893fd9aed15b0a3c186d565bc0afb7bdc8247a3 /indra/llui/lltexteditor.cpp | |
| parent | 65fd784f136d4fc2183b97b6c15bd0c338bdb833 (diff) | |
| parent | cfccf4d5145274f7bfe1c88b7e51c000461226e8 (diff) | |
Automated merge with ssh://angela@hg.lindenlab.com/james/gooey
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
| -rw-r--r-- | indra/llui/lltexteditor.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 224f066968..3f4ef24f82 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -750,8 +750,10 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask) { if( mIsSelecting ) { - mScroller->autoScroll(x, y); - + if(mScroller) + { + mScroller->autoScroll(x, y); + } S32 clamped_x = llclamp(x, mTextRect.mLeft, mTextRect.mRight); S32 clamped_y = llclamp(y, mTextRect.mBottom, mTextRect.mTop); setCursorAtLocalPos( clamped_x, clamped_y, true ); @@ -799,7 +801,10 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) { if( mIsSelecting ) { - mScroller->autoScroll(x, y); + if(mScroller) + { + mScroller->autoScroll(x, y); + } S32 clamped_x = llclamp(x, mTextRect.mLeft, mTextRect.mRight); S32 clamped_y = llclamp(y, mTextRect.mBottom, mTextRect.mTop); setCursorAtLocalPos( clamped_x, clamped_y, true ); @@ -1696,7 +1701,15 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask ) */ if (mReadOnly) { - handled = mScroller->handleKeyHere( key, mask ); + if(mScroller) + { + handled = mScroller->handleKeyHere( key, mask ); + } + else + { + handled = handleNavigationKey( key, mask ); + } + } else { @@ -2135,9 +2148,8 @@ void LLTextEditor::drawPreeditMarker() void LLTextEditor::drawLineNumbers() { LLGLSUIDefault gls_ui; - - LLRect scrolled_view_rect = mScroller->getVisibleContentRect(); - LLRect content_rect = mScroller->getContentWindowRect(); + LLRect scrolled_view_rect = getVisibleDocumentRect(); + LLRect content_rect = getTextRect(); LLLocalClipRect clip(content_rect); S32 first_line = getFirstVisibleLine(); S32 num_lines = getLineCount(); |
