summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-11-01 22:02:35 +0000
committerJosh Bell <josh@lindenlab.com>2007-11-01 22:02:35 +0000
commit7afa8058aae0d5363cc19c7df1e6d2d7ec3bf7ac (patch)
tree52f41bda3e57a58e968421212a8a48eead6f653d /indra/llui/lltexteditor.cpp
parent833e8d5c2a1dd48fd89b8b438dbe56572697bb76 (diff)
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.
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp34
1 files changed, 23 insertions, 11 deletions
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();