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