diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-03-21 18:00:21 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-03-21 18:00:21 -0700 |
commit | 22681ddb90b9fcb5eccb4467bb13704075de67d9 (patch) | |
tree | bb5ea48aeaf386c313518ba9dabff1fa32d2c03a /indra | |
parent | b7aa6803a1f34de0cce9a88f9ecd9c7827c4bb52 (diff) |
PATH-199: Disabling more functionality of the build tool floater when permanancy is enforced.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelobject.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llpanelvolume.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llselectmgr.cpp | 4 |
3 files changed, 14 insertions, 8 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index f0cd0f5d19..2e41aa8002 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -501,24 +501,30 @@ void LLPanelObject::getState( ) } BOOL is_flexible = volobjp && volobjp->isFlexible(); + BOOL is_permanent = root_objectp->flagObjectPermanent(); + BOOL is_permanent_enforced = root_objectp->isPermanentEnforced(); // Physics checkbox mIsPhysical = root_objectp->flagUsePhysics(); + //llassert(is_permanent && mIsPhysical); // should never has a permanent object that is also physical + mCheckPhysics->set( mIsPhysical ); mCheckPhysics->setEnabled( roots_selected>0 && (editable || gAgent.isGodlike()) - && !is_flexible); + && !is_flexible && !is_permanent); mIsTemporary = root_objectp->flagTemporaryOnRez(); + //llassert(is_permanent && mIsTemporary); // should never has a permanent object that is also temporary + mCheckTemporary->set( mIsTemporary ); - mCheckTemporary->setEnabled( roots_selected>0 && editable ); + mCheckTemporary->setEnabled( roots_selected>0 && editable && !is_permanent); mIsPhantom = root_objectp->flagPhantom(); mCheckPhantom->set( mIsPhantom ); - mCheckPhantom->setEnabled( roots_selected>0 && editable && !is_flexible ); + mCheckPhantom->setEnabled( roots_selected>0 && editable && !is_flexible && !is_permanent_enforced ); - mCheckPermanent->set( root_objectp->flagObjectPermanent() ); - mCheckPermanent->setEnabled( FALSE ); + mCheckPermanent->set(is_permanent); + mCheckPermanent->setEnabled(FALSE); //---------------------------------------------------------------------------- diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 12eea7844d..80dc2c0013 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -495,7 +495,7 @@ void LLPanelVolume::getState( ) mComboPhysicsShapeType->add(getString("Convex Hull"), LLSD(2)); mComboPhysicsShapeType->setValue(LLSD(objectp->getPhysicsShapeType())); - mComboPhysicsShapeType->setEnabled(editable); + mComboPhysicsShapeType->setEnabled(editable && !objectp->isPermanentEnforced()); mObject = objectp; mRootObject = root_objectp; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index ae61ead935..9b56a5be35 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -638,7 +638,7 @@ bool LLSelectMgr::enableLinkObjects() { virtual bool apply(LLViewerObject* object) { - return object->permModify(); + return object->permModify() && !object->isPermanentEnforced(); } } func; const bool firstonly = true; @@ -654,7 +654,7 @@ bool LLSelectMgr::enableUnlinkObjects() bool new_value = LLSelectMgr::getInstance()->selectGetAllRootsValid() && first_editable_object && - !first_editable_object->isAttachment(); + !first_editable_object->isAttachment() && !first_editable_object->isPermanentEnforced(); return new_value; } |