diff options
Diffstat (limited to 'linden/indra/newview/llpanelcontents.cpp')
-rw-r--r-- | linden/indra/newview/llpanelcontents.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/linden/indra/newview/llpanelcontents.cpp b/linden/indra/newview/llpanelcontents.cpp index 33cebec..e5c4f79 100644 --- a/linden/indra/newview/llpanelcontents.cpp +++ b/linden/indra/newview/llpanelcontents.cpp | |||
@@ -123,6 +123,24 @@ void LLPanelContents::getState(LLViewerObject *objectp ) | |||
123 | && ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488 | 123 | && ( objectp->permYouOwner() || ( !group_id.isNull() && gAgent.isInGroup(group_id) ))); // solves SL-23488 |
124 | BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); | 124 | BOOL all_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ); |
125 | 125 | ||
126 | // [RLVa:KB] - Version: 1.23.4 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a | ||
127 | if ( (rlv_handler_t::isEnabled()) && (editable) ) | ||
128 | { | ||
129 | // Don't allow creation of new scripts if it's undetachable | ||
130 | editable = !gRlvHandler.isLockedAttachment(objectp, RLV_LOCK_REMOVE); | ||
131 | |||
132 | // Don't allow creation of new scripts if we're @unsit=n or @sittp=n restricted and we're sitting on the selection | ||
133 | if ( (editable) && ((gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))) ) | ||
134 | { | ||
135 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
136 | // Only check the first (non-)root object because nothing else would result in enabling the button (see below) | ||
137 | LLViewerObject* pObj = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(TRUE); | ||
138 | |||
139 | editable = (pObj) && (pAvatar) && ((!pAvatar->mIsSitting) || (pAvatar->getRoot() != pObj->getRootEdit())); | ||
140 | } | ||
141 | } | ||
142 | // [/RLVa:KB] | ||
143 | |||
126 | // Edit script button - ok if object is editable and there's an unambiguous destination for the object. | 144 | // Edit script button - ok if object is editable and there's an unambiguous destination for the object. |
127 | childSetEnabled("button new script", | 145 | childSetEnabled("button new script", |
128 | editable && | 146 | editable && |