From 7afa8058aae0d5363cc19c7df1e6d2d7ec3bf7ac Mon Sep 17 00:00:00 2001 From: Josh Bell Date: Thu, 1 Nov 2007 22:02:35 +0000 Subject: svn merge -r 72652:72881 svn+ssh://svn.lindenlab.com/svn/linden/branches/sl-search-11 --> release QAR-11: pair-reviewed the merge w/ Sam. --- indra/llui/lltexteditor.cpp | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'indra/llui/lltexteditor.cpp') diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 12ad339886..0184878e45 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -967,17 +967,6 @@ void LLTextEditor::endSelection() mIsSelecting = FALSE; mSelectionEnd = mCursorPos; } - if (mParseHTML && mHTML.length() > 0) - { - //Special handling for slurls - if ( (mSecondlifeURLcallback!=NULL) && !(*mSecondlifeURLcallback)(mHTML) ) - { - if (mURLcallback!=NULL) (*mURLcallback)(mHTML.c_str()); - - //load_url(url.c_str()); - } - mHTML=""; - } } BOOL LLTextEditor::selectionContainsLineBreaks() @@ -1408,6 +1397,7 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) if( hasMouseCapture() ) { gFocusMgr.setMouseCapture( NULL ); + handled = TRUE; } @@ -3814,6 +3804,22 @@ void LLTextEditor::findEmbeddedItemSegments() BOOL LLTextEditor::handleMouseUpOverSegment(S32 x, S32 y, MASK mask) { + if ( hasMouseCapture() ) + { + // This mouse up was part of a click. + // Regardless of where the cursor is, see if we recently touched a link + // and launch it if we did. + if (mParseHTML && mHTML.length() > 0) + { + //Special handling for slurls + if ( (mSecondlifeURLcallback!=NULL) && !(*mSecondlifeURLcallback)(mHTML) ) + { + if (mURLcallback!=NULL) (*mURLcallback)(mHTML.c_str()); + } + mHTML=""; + } + } + return FALSE; } @@ -4245,6 +4251,12 @@ BOOL LLTextEditor::findHTML(const LLString &line, S32 *begin, S32 *end) strpos = url.find(slurlID); } + if (strpos < 0) + { + slurlID="sl://"; + strpos = url.find(slurlID); + } + if (strpos >= 0) { strpos+=slurlID.length(); -- cgit v1.2.3