diff options
| author | Dave Houlton <euclid@lindenlab.com> | 2020-09-22 23:24:00 +0000 |
|---|---|---|
| committer | Dave Houlton <euclid@lindenlab.com> | 2020-09-22 23:24:00 +0000 |
| commit | 987be6bdb4d6b554ee30692d6b4508640f132a0c (patch) | |
| tree | 0d00fdcb12b4dfa5c9d5fb954188258285636f77 /indra/llui/lltextbase.cpp | |
| parent | c2c5e672e25d3272db0b062c3831abded6db9141 (diff) | |
| parent | 79b8c9de9be576f46f7471f726c6d8e3d91cc131 (diff) | |
Merged in DV510-merge-6.4.9 (pull request #313)
Merge master 6.4.9 into DRTVWR-510
Diffstat (limited to 'indra/llui/lltextbase.cpp')
| -rw-r--r-- | indra/llui/lltextbase.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 83b851eed2..30bf938591 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1017,7 +1017,38 @@ BOOL LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask) // handle triple click if (!mTripleClickTimer.hasExpired()) { - selectAll(); + S32 real_line = getLineNumFromDocIndex(mCursorPos, false); + S32 line_start = -1; + S32 line_end = -1; + for (line_list_t::const_iterator it = mLineInfoList.begin(), end_it = mLineInfoList.end(); + it != end_it; + ++it) + { + if (it->mLineNum < real_line) + { + continue; + } + if (it->mLineNum > real_line) + { + break; + } + if (line_start == -1) + { + line_start = it->mDocIndexStart; + } + line_end = it->mDocIndexEnd; + line_end = llclamp(line_end, 0, getLength()); + } + + if (line_start == -1) + { + return TRUE; + } + + mSelectionEnd = line_start; + mSelectionStart = line_end; + setCursorPos(line_start); + return TRUE; } |
