diff options
author | richard <none@none> | 2009-11-25 18:55:15 -0800 |
---|---|---|
committer | richard <none@none> | 2009-11-25 18:55:15 -0800 |
commit | 617ca79ed073604883f3e0e21b2e81a3786bbe6f (patch) | |
tree | 154f5df80ea318f0e19565072f6b1bfed5613857 /indra/llui | |
parent | cdb223228479e97d9cfe7d80d0afef0d99179d24 (diff) |
forgot to apply resize fix for when text is selected
EXT-1995 - [BSI] Get rid of the *blop* sound when a textbox contains more text than displayable
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lltextbase.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 6f9f98187c..4a7d17cc62 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -641,8 +641,6 @@ S32 LLTextBase::insertStringNoUndo(S32 pos, const LLWString &wstr, LLTextBase::s if ( truncate() ) { - // The user's not getting everything he's hoping for - make_ui_sound("UISndBadKeystroke"); insert_len = getLength() - old_len; } @@ -1070,6 +1068,8 @@ void LLTextBase::reflow(S32 start_index) LLRect old_cursor_rect = getLocalRectFromDocIndex(mCursorPos); bool follow_selection = mTextRect.overlaps(old_cursor_rect); // cursor is visible + old_cursor_rect.translate(-mTextRect.mLeft, -mTextRect.mBottom); + S32 first_line = getFirstVisibleLine(); // if scroll anchor not on first line, update it to first character of first line @@ -1206,9 +1206,7 @@ void LLTextBase::reflow(S32 start_index) { // keep cursor in same vertical position on screen when selecting text LLRect new_cursor_rect_doc = getDocRectFromDocIndex(mCursorPos); - LLRect old_cursor_rect_scroller = old_cursor_rect; - old_cursor_rect.translate(-mTextRect.mLeft, -mTextRect.mBottom); - mScroller->scrollToShowRect(new_cursor_rect_doc, old_cursor_rect_scroller); + mScroller->scrollToShowRect(new_cursor_rect_doc, old_cursor_rect); } else { |