RLVa 1.1.2 to 1.1.3 upgrade. InvLinks + COF
This commit is contained in:
@@ -67,8 +67,7 @@
|
||||
#include "lltoolmgr.h"
|
||||
#include "lltoolcomp.h"
|
||||
#include "llpanelinventory.h"
|
||||
|
||||
// [RLVa:KB]
|
||||
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c)
|
||||
#include "rlvhandler.h"
|
||||
// [/RLVa:KB]
|
||||
|
||||
@@ -123,19 +122,20 @@ void LLPanelContents::getState(LLViewerObject *objectp )
|
||||
&& ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488
|
||||
BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME );
|
||||
|
||||
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a
|
||||
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a
|
||||
if ( (rlv_handler_t::isEnabled()) && (editable) )
|
||||
{
|
||||
// Don't allow creation of new scripts if it's undetachable
|
||||
editable = !gRlvHandler.isLockedAttachment(objectp, RLV_LOCK_REMOVE);
|
||||
// Don't allow creation of new scripts if it's non-detachable
|
||||
if (objectp->isAttachment())
|
||||
editable = !gRlvAttachmentLocks.isLockedAttachment(objectp->getRootEdit());
|
||||
|
||||
// Don't allow creation of new scripts if we're @unsit=n or @sittp=n restricted and we're sitting on the selection
|
||||
if ( (editable) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) )
|
||||
{
|
||||
LLVOAvatar* pAvatar = gAgent.getAvatarObject();
|
||||
// Only check the first (non-)root object because nothing else would result in enabling the button (see below)
|
||||
LLViewerObject* pObj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(TRUE);
|
||||
|
||||
LLVOAvatar* pAvatar = gAgent.getAvatarObject();
|
||||
editable = (pObj) && (pAvatar) && ((!pAvatar->mIsSitting) || (pAvatar->getRoot() != pObj->getRootEdit()));
|
||||
}
|
||||
}
|
||||
@@ -175,10 +175,10 @@ void LLPanelContents::onClickNewScript(void *userdata)
|
||||
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok);
|
||||
if(object)
|
||||
{
|
||||
// [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a)
|
||||
// [RLVa:KB] - Checked: 2010-03-31 (RLVa-1.2.0c) | Modified: RLVa-1.0.5a
|
||||
if (rlv_handler_t::isEnabled()) // Fallback code [see LLPanelContents::getState()]
|
||||
{
|
||||
if (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE))
|
||||
if (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit()))
|
||||
{
|
||||
return; // Disallow creating new scripts in a locked attachment
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user