diff options
author | Bryan O'Sullivan <bos@lindenlab.com> | 2009-09-08 14:28:31 -0700 |
---|---|---|
committer | Bryan O'Sullivan <bos@lindenlab.com> | 2009-09-08 14:28:31 -0700 |
commit | 76001ce3f0b53391c674f315855017b78a3a2873 (patch) | |
tree | a2c74f15dcf8c611ce87c4cb6c3a5751e9b8d9e3 /indra/newview/llviewertexteditor.cpp | |
parent | 40743eaf99c9cbfee08f0bb44bc7c614bc660f34 (diff) | |
parent | 2ed83382a1dd84575536c16e248a602ba96755cd (diff) |
Merge
Diffstat (limited to 'indra/newview/llviewertexteditor.cpp')
-rw-r--r-- | indra/newview/llviewertexteditor.cpp | 45 |
1 files changed, 13 insertions, 32 deletions
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index de01e79803..5bb0c9a120 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -814,38 +814,18 @@ BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) BOOL LLViewerTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask) { - BOOL handled = childrenHandleRightMouseDown(x, y, mask) != NULL; - - // *TODO: Add right click menus for SLURLs -// if(! handled) -// { -// const LLTextSegment* cur_segment = getSegmentAtLocalPos( x, y ); -// if( cur_segment ) -// { -// if(cur_segment->getStyle()->isLink()) -// { -// handled = TRUE; -// mHTML = cur_segment->getStyle()->getLinkHREF(); -// } -// } -// } -// LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get(); -// if(handled && menu && mParseHTML && mHTML.length() > 0) -// { -// menu->setVisible(TRUE); -// menu->arrange(); -// menu->updateParent(LLMenuGL::sMenuContainer); -// LLMenuGL::showPopup(this, menu, x, y); -// mHTML = ""; -// } -// else -// { -// if(menu && menu->getVisible()) -// { -// menu->setVisible(FALSE); -// } -// } - return handled; + // pop up a context menu for any Url under the cursor + if (handleRightMouseDownOverUrl(this, x, y)) + { + return TRUE; + } + + if (childrenHandleRightMouseDown(x, y, mask) != NULL) + { + return TRUE; + } + + return FALSE; } BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) @@ -1087,6 +1067,7 @@ llwchar LLViewerTextEditor::pasteEmbeddedItem(llwchar ext_char) void LLViewerTextEditor::onValueChange(S32 start, S32 end) { updateSegments(); + updateLinkSegments(); findEmbeddedItemSegments(start, end); } |