diff options
Diffstat (limited to 'linden/indra/newview/lltoolselect.cpp')
-rw-r--r-- | linden/indra/newview/lltoolselect.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/linden/indra/newview/lltoolselect.cpp b/linden/indra/newview/lltoolselect.cpp index b4e9562..389ae59 100644 --- a/linden/indra/newview/lltoolselect.cpp +++ b/linden/indra/newview/lltoolselect.cpp | |||
@@ -50,6 +50,10 @@ | |||
50 | #include "llvoavatar.h" | 50 | #include "llvoavatar.h" |
51 | #include "llworld.h" | 51 | #include "llworld.h" |
52 | 52 | ||
53 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | ||
54 | #include "llfloatertools.h" | ||
55 | // [/RLVa:KB] | ||
56 | |||
53 | // Globals | 57 | // Globals |
54 | extern BOOL gAllowSelectAvatar; | 58 | extern BOOL gAllowSelectAvatar; |
55 | 59 | ||
@@ -82,6 +86,51 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi | |||
82 | { | 86 | { |
83 | object = object->getRootEdit(); | 87 | object = object->getRootEdit(); |
84 | } | 88 | } |
89 | |||
90 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.0f | ||
91 | if (rlv_handler_t::isEnabled()) | ||
92 | { | ||
93 | if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) | ||
94 | { | ||
95 | if (!temp_select) | ||
96 | { | ||
97 | return LLSelectMgr::getInstance()->getSelection(); | ||
98 | } | ||
99 | else | ||
100 | { | ||
101 | // Temporary selection, but if the build floater is open then it'll be permanent so get rid of the floater | ||
102 | if (gFloaterTools->getVisible()) | ||
103 | { | ||
104 | // Copy/paste from toggle_build_mode() | ||
105 | gAgent.resetView(false); | ||
106 | gFloaterTools->close(); | ||
107 | gViewerWindow->showCursor(); | ||
108 | } | ||
109 | } | ||
110 | } | ||
111 | |||
112 | if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (object) && ((!object->isAttachment()) || (!object->permYouOwner())) && | ||
113 | (dist_vec_squared(gAgent.getPositionAgent(), object->getPositionRegion()) > 1.5f * 1.5f) ) | ||
114 | { | ||
115 | // NOTE-RLVa: see behaviour notes for a rather lengthy explanation of why we're doing things this way | ||
116 | //if (dist_vec_squared(gAgent.getPositionAgent(), object->getPositionRegion() + pick.mObjectOffset) > 1.5f * 1.5f) | ||
117 | if (dist_vec_squared(gAgent.getPositionAgent(), pick.mIntersection) > 1.5f * 1.5f) | ||
118 | { | ||
119 | if ( (gFloaterTools->getVisible()) && (pick.mKeyMask != MASK_SHIFT) && (pick.mKeyMask != MASK_CONTROL) ) | ||
120 | LLSelectMgr::getInstance()->deselectAll(); | ||
121 | return LLSelectMgr::getInstance()->getSelection(); | ||
122 | } | ||
123 | else if (gFloaterTools->getVisible()) | ||
124 | { | ||
125 | // Copy/paste from toggle_build_mode() | ||
126 | gAgent.resetView(false); | ||
127 | gFloaterTools->close(); | ||
128 | gViewerWindow->showCursor(); | ||
129 | } | ||
130 | } | ||
131 | } | ||
132 | // [/RLVa:KB] | ||
133 | |||
85 | BOOL select_owned = gSavedSettings.getBOOL("SelectOwnedOnly"); | 134 | BOOL select_owned = gSavedSettings.getBOOL("SelectOwnedOnly"); |
86 | BOOL select_movable = gSavedSettings.getBOOL("SelectMovableOnly"); | 135 | BOOL select_movable = gSavedSettings.getBOOL("SelectMovableOnly"); |
87 | 136 | ||