diff options
Diffstat (limited to 'linden/indra/newview/llviewertexteditor.cpp')
-rw-r--r-- | linden/indra/newview/llviewertexteditor.cpp | 86 |
1 files changed, 39 insertions, 47 deletions
diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp index 3e2cc19..76b752c 100644 --- a/linden/indra/newview/llviewertexteditor.cpp +++ b/linden/indra/newview/llviewertexteditor.cpp | |||
@@ -95,6 +95,13 @@ public: | |||
95 | } | 95 | } |
96 | else | 96 | else |
97 | { | 97 | { |
98 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
99 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour("viewnote")) ) | ||
100 | { | ||
101 | return; | ||
102 | } | ||
103 | // [/RLVa:KB] | ||
104 | |||
98 | // See if we can bring an existing preview to the front | 105 | // See if we can bring an existing preview to the front |
99 | if(!LLPreview::show(item->getUUID(), true)) | 106 | if(!LLPreview::show(item->getUUID(), true)) |
100 | { | 107 | { |
@@ -893,51 +900,9 @@ BOOL LLViewerTextEditor::handleHover(S32 x, S32 y, MASK mask) | |||
893 | 900 | ||
894 | BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) | 901 | BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) |
895 | { | 902 | { |
896 | BOOL handled = FALSE; | 903 | BOOL handled = FALSE; |
897 | |||
898 | // let scrollbar have first dibs | ||
899 | handled = LLView::childrenHandleMouseUp(x, y, mask) != NULL; | ||
900 | |||
901 | // Used to enable I Agree checkbox if the user scrolled through entire text | ||
902 | BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax()); | ||
903 | if (mOnScrollEndCallback && was_scrolled_to_bottom) | ||
904 | { | ||
905 | mOnScrollEndCallback(mOnScrollEndData); | ||
906 | } | ||
907 | |||
908 | if( !handled && mTakesNonScrollClicks) | ||
909 | { | ||
910 | if( mIsSelecting ) | ||
911 | { | ||
912 | // Finish selection | ||
913 | if( y > getTextRect().mTop ) | ||
914 | { | ||
915 | mScrollbar->setDocPos( mScrollbar->getDocPos() - 1 ); | ||
916 | } | ||
917 | else | ||
918 | if( y < getTextRect().mBottom ) | ||
919 | { | ||
920 | mScrollbar->setDocPos( mScrollbar->getDocPos() + 1 ); | ||
921 | } | ||
922 | |||
923 | setCursorAtLocalPos( x, y, TRUE ); | ||
924 | endSelection(); | ||
925 | |||
926 | updateScrollFromCursor(); | ||
927 | } | ||
928 | |||
929 | if( !hasSelection() ) | ||
930 | { | ||
931 | handleMouseUpOverSegment( x, y, mask ); | ||
932 | } | ||
933 | |||
934 | handled = TRUE; | ||
935 | } | ||
936 | |||
937 | // Delay cursor flashing | ||
938 | resetKeystrokeTimer(); | ||
939 | 904 | ||
940 | if( hasMouseCapture() ) | 905 | if( hasMouseCapture() ) |
941 | { | 906 | { |
942 | if (mDragItem) | 907 | if (mDragItem) |
943 | { | 908 | { |
@@ -956,8 +921,15 @@ BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) | |||
956 | } | 921 | } |
957 | } | 922 | } |
958 | mDragItem = NULL; | 923 | mDragItem = NULL; |
959 | gFocusMgr.setMouseCapture( NULL ); | 924 | } |
960 | handled = TRUE; | 925 | |
926 | handled = LLTextEditor::handleMouseUp(x,y,mask); | ||
927 | |||
928 | // Used to enable I Agree checkbox if the user scrolled through entire text | ||
929 | BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax()); | ||
930 | if (mOnScrollEndCallback && was_scrolled_to_bottom) | ||
931 | { | ||
932 | mOnScrollEndCallback(mOnScrollEndData); | ||
961 | } | 933 | } |
962 | 934 | ||
963 | return handled; | 935 | return handled; |
@@ -999,6 +971,24 @@ BOOL LLViewerTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask) | |||
999 | return handled; | 971 | return handled; |
1000 | } | 972 | } |
1001 | 973 | ||
974 | BOOL LLViewerTextEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask) | ||
975 | { | ||
976 | BOOL handled = FALSE; | ||
977 | handled = childrenHandleMiddleMouseDown(x, y, mask) != NULL; | ||
978 | if (!handled) | ||
979 | { | ||
980 | handled = LLTextEditor::handleMiddleMouseDown(x, y, mask); | ||
981 | } | ||
982 | return handled; | ||
983 | } | ||
984 | |||
985 | BOOL LLViewerTextEditor::handleMiddleMouseUp(S32 x, S32 y, MASK mask) | ||
986 | { | ||
987 | BOOL handled = childrenHandleMiddleMouseUp(x, y, mask) != NULL; | ||
988 | |||
989 | return handled; | ||
990 | } | ||
991 | |||
1002 | BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) | 992 | BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) |
1003 | { | 993 | { |
1004 | BOOL handled = FALSE; | 994 | BOOL handled = FALSE; |
@@ -1021,7 +1011,6 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
1021 | } | 1011 | } |
1022 | } | 1012 | } |
1023 | } | 1013 | } |
1024 | |||
1025 | 1014 | ||
1026 | setCursorAtLocalPos( x, y, FALSE ); | 1015 | setCursorAtLocalPos( x, y, FALSE ); |
1027 | deselect(); | 1016 | deselect(); |
@@ -1059,6 +1048,9 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
1059 | // delay cursor flashing | 1048 | // delay cursor flashing |
1060 | resetKeystrokeTimer(); | 1049 | resetKeystrokeTimer(); |
1061 | 1050 | ||
1051 | // take selection to 'primary' clipboard | ||
1052 | updatePrimary(); | ||
1053 | |||
1062 | handled = TRUE; | 1054 | handled = TRUE; |
1063 | } | 1055 | } |
1064 | return handled; | 1056 | return handled; |