summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2013-09-17 12:20:28 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2013-09-17 12:20:28 +0300
commit8fa463113c19682a64988d2f8c527ef5e5dd156c (patch)
tree67dd68e257ebc8c4ea475265bacebbfb13d8b91f /indra/llui
parentea9af8b873c9c088ff640a556f14f3a5989f9547 (diff)
MAINT-3119 FIXED Select auto-completed part using cursor position
Diffstat (limited to 'indra/llui')
-rwxr-xr-xindra/llui/lltexteditor.cpp8
-rwxr-xr-xindra/llui/lltexteditor.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 0c16e06109..764f0b8b36 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;
diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h
index 32b543ec0e..d3b7bc0eb7 100755
--- a/indra/llui/lltexteditor.h
+++ b/indra/llui/lltexteditor.h
@@ -144,6 +144,8 @@ public:
virtual void selectAll();
virtual BOOL canSelectAll() const;
+ void selectByCursorPosition(S32 prev_cursor_pos, S32 next_cursor_pos);
+
virtual bool canLoadOrSaveToFile();
void selectNext(const std::string& search_text_in, BOOL case_insensitive, BOOL wrap = TRUE);