diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index c2ab643f604beb7c35f30e6f2eac20bb16b1b74d..114cc4c7aab6c5cdbf44c405978542040a60f3de 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -72,8 +72,13 @@ const F32 PARCEL_POST_HEIGHT = 0.666f; // Returns true if you got at least one object void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) { -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l - if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT))) ) +// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c + // Block rectangle selection if: + // - prevented from editing and no exceptions are set (see below for the case where exceptions are set) + // - prevented from interacting at all + if ( (rlv_handler_t::isEnabled()) && + ( ((gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!gRlvHandler.hasException(RLV_BHVR_EDIT))) || + (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) ) ) { return; } @@ -238,6 +243,13 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) continue; } +// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Added: RLVa-1.3.0c + if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canEdit(vobjp)) ) + { + continue; + } +// [/RLVa:KB] + S32 result = LLViewerCamera::getInstance()->sphereInFrustum(drawable->getPositionAgent(), drawable->getRadius()); if (result) { diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 4a0ff13dadb9998d84c456ebf1688924d00ae6e6..a5c71a52dae5575d3d80c43a451672bd3e96f684 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3519,15 +3519,16 @@ void LLSelectMgr::convertTransient() void LLSelectMgr::deselectAllIfTooFar() { -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!mSelectedObjects->isEmpty()) ) +// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c + if ( (!mSelectedObjects->isEmpty()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_EDITOBJ))) ) { - struct NotTransientOrFocusedMedia : public LLSelectedNodeFunctor + struct NotTransientOrFocusedMediaOrEditable : public LLSelectedNodeFunctor { - bool apply(LLSelectNode* node) + bool apply(LLSelectNode* pNode) { - return (node) && (node->getObject()) && - ( (!node->isTransient()) && (node->getObject()->getID() != LLViewerMediaFocus::getInstance()->getFocusedObjectID()) ); + const LLViewerObject* pObj = pNode->getObject(); + return (!pNode->isTransient()) && (pObj) && (!gRlvHandler.canEdit(pObj)) && + (pObj->getID() != LLViewerMediaFocus::getInstance()->getFocusedObjectID()); } } f; if (mSelectedObjects->getFirstRootNode(&f, TRUE)) diff --git a/indra/newview/lltoolface.cpp b/indra/newview/lltoolface.cpp index 20fffb3012cf5c71068df72a33a9ef9fdf320000..4b02174009d2017d29b4580f6c6a0083eba8c8a4 100644 --- a/indra/newview/lltoolface.cpp +++ b/indra/newview/lltoolface.cpp @@ -93,9 +93,9 @@ void LLToolFace::pickCallback(const LLPickInfo& pick_info) return; } -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l +// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c if ( (rlv_handler_t::isEnabled()) && - ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || + ( (!gRlvHandler.canEdit(hit_obj)) || ((gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (!gRlvHandler.canTouch(hit_obj, pick_info.mObjectOffset))) ) ) { return; diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index f9b413410d4ec73f911a01aa402c7050784e4429..86cc8b489b00aa6164874027b85b427b6d3cb9d5 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -297,14 +297,6 @@ void LLToolMgr::toggleBuildMode() } } -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b - // TODO-RLVa: [RLVa-1.2.1] Does this code actually still ever trigger? - if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) - { - LLSelectMgr::getInstance()->deselectAll(); - } -// [/RLVa:KB] - setCurrentToolset(gBasicToolset); getCurrentToolset()->selectTool( LLToolCompCreate::getInstance() ); diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 3ff7b5cf4848f5db79ce4e195025b531bf06b674..bbe8f33a6550bfbcbe7f3861f8bea9c0eacc0113 100644 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -83,10 +83,10 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi object = object->getRootEdit(); } -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l +// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c if (rlv_handler_t::isEnabled()) { - if (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) + if (!gRlvHandler.canEdit(object)) { if (!temp_select) return LLSelectMgr::getInstance()->getSelection(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 03866d0da7929677c430469f157c23193c6abcda..14860111d6d7f9253acb21fc90ce1d03400e9d96 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2702,8 +2702,15 @@ bool enable_object_edit() else if (LLSelectMgr::getInstance()->selectGetAllValidAndObjectsFound()) { // enable = true; -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e - enable = !gRlvHandler.hasBehaviour(RLV_BHVR_EDIT); +// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c + bool fRlvCanEdit = (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDITOBJ)); + if (!fRlvCanEdit) + { + LLObjectSelectionHandle hSel = LLSelectMgr::getInstance()->getSelection(); + RlvSelectIsEditable f; + fRlvCanEdit = (hSel.notNull()) && ((hSel->getFirstRootNode(&f, TRUE)) == NULL); + } + enable = fRlvCanEdit; // [/RLVa:KB] } @@ -7605,12 +7612,10 @@ class LLViewHighlightTransparent : public view_listener_t { bool handleEvent(const LLSD& userdata) { -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b - if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!LLDrawPoolAlpha::sShowDebugAlpha)) - return true; +// LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha; +// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c + LLDrawPoolAlpha::sShowDebugAlpha = (!LLDrawPoolAlpha::sShowDebugAlpha) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)); // [/RLVa:KB] - - LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha; return true; } }; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index e1405e9708f3035b30f6c3cdb803c63fcfa036c8..de3668fcd7d5d72b3f0487774b64e984bfadc652 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -5079,8 +5079,8 @@ BOOL LLViewerObject::permTransfer() const // given you modify rights to. JC BOOL LLViewerObject::allowOpen() const { -// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b - return !flagInventoryEmpty() && (permYouOwner() || permModify()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)); +// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c + return !flagInventoryEmpty() && (permYouOwner() || permModify()) && ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canEdit(this))); // [/RLVa:KB] // return !flagInventoryEmpty() && (permYouOwner() || permModify()); }