diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-12-05 10:39:35 -0500 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-12-05 10:39:35 -0500 |
| commit | 744cf6be8d5a808020a4d6cc98ff4c6b208239c0 (patch) | |
| tree | fab4ec7a30752ef1087d15540899830bf766cb89 /indra/llui/lltexteditor.cpp | |
| parent | 1320e5ddcd9fc3be526dcacbf4710f8bcf878665 (diff) | |
| parent | 787ccaf297e81291469aaf269f563d862fb150a3 (diff) | |
merge
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
| -rwxr-xr-x | indra/llui/lltexteditor.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 0c16e06109..62140dd9d6 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -666,6 +666,14 @@ void LLTextEditor::selectAll() updatePrimary(); } +void LLTextEditor::selectByCursorPosition(S32 prev_cursor_pos, S32 next_cursor_pos) +{ + setCursorPos(prev_cursor_pos); + startSelection(); + setCursorPos(next_cursor_pos); + endSelection(); +} + BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) { BOOL handled = FALSE; @@ -713,7 +721,6 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) setCursorAtLocalPos( x, y, true ); startSelection(); } - gFocusMgr.setMouseCapture( this ); } handled = TRUE; @@ -722,6 +729,10 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) // Delay cursor flashing resetCursorBlink(); + if (handled && !gFocusMgr.getMouseCapture()) + { + gFocusMgr.setMouseCapture( this ); + } return handled; } |
