diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-09-22 22:54:36 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-09-22 22:54:36 +0300 |
commit | c2b55c4362111c124df30eb339461486bda32ec9 (patch) | |
tree | 841267dade995551e9d1ab8f39ab98c7a56174db /indra/llui/lltextbase.cpp | |
parent | e566e82269ff52a88e3dc28345bba6c273a2eebf (diff) | |
parent | 60ed688026269568a9eef67437dc780f88c92871 (diff) |
Merged master(DRTVWR-503) into DRTVWR-514-keymappings
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; } |