From bb282e82dc3c324b610b745c03e63995c7fc199a Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 21 Dec 2010 04:27:30 +0100 Subject: [PATCH] - fixed : current selection on the line editor extends when right-clicking outside of the selection --HG-- branch : Misc-Spellcheck --- indra/llui/lllineeditor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 19b893b0b1..8506ef9666 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -2434,8 +2434,10 @@ void LLLineEditor::showContextMenu(S32 x, S32 y) S32 screen_x, screen_y; localPointToScreen(x, y, &screen_x, &screen_y); // [SL:KB] - Patch: Misc-Spellcheck | Checked: 2010-12-19 (Catznip-2.5.0a) | Added: Catznip-2.5.0a - // Move the cursor to where the user right-clicked + // Move the cursor to where the user right-clicked (clear the current selection if the user right-clicked outside of it) setCursorAtLocalPos(x); + if ( (mCursorPos < mSelectionStart) || (mCursorPos > mSelectionEnd) ) + deselect(); // If the cursor is on a misspelled word, retrieve suggestions for it mSuggestionList.clear();