diff options
| author | Oz Linden <oz@lindenlab.com> | 2016-08-11 15:36:09 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2016-08-11 15:36:09 -0400 |
| commit | 6ff420d705625fef4b0456c19bb9c766cabb31af (patch) | |
| tree | 16c27571df04932dd830b35e06cdf4e9b5dbf07e /indra/newview/llpreviewnotecard.cpp | |
| parent | c32b27f5b77c7d8e53b11163d04f2842949d71de (diff) | |
| parent | 4fb100ac7a33174883184f1320d0beac08ead3a7 (diff) | |
merge changes for 4.0.7-release
Diffstat (limited to 'indra/newview/llpreviewnotecard.cpp')
| -rw-r--r-- | indra/newview/llpreviewnotecard.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 20c43bc432..ba9845ef04 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -94,7 +94,8 @@ BOOL LLPreviewNotecard::postBuild() if (item) { getChild<LLUICtrl>("desc")->setValue(item->getDescription()); - getChildView("Delete")->setEnabled(true); + BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(item->getUUID(), gInventory.getLibraryRootFolderID()); + getChildView("Delete")->setEnabled(!source_library); } getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe); @@ -219,6 +220,7 @@ void LLPreviewNotecard::loadAsset() BOOL is_owner = gAgent.allowOperation(PERM_OWNER, perm, GP_OBJECT_MANIPULATE); BOOL allow_copy = gAgent.allowOperation(PERM_COPY, perm, GP_OBJECT_MANIPULATE); BOOL allow_modify = canModify(mObjectUUID, item); + BOOL source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID()); if (allow_copy || gAgent.isGodlike()) { @@ -288,7 +290,7 @@ void LLPreviewNotecard::loadAsset() getChildView("lock")->setVisible( TRUE); } - if(allow_modify || is_owner) + if((allow_modify || is_owner) && !source_library) { getChildView("Delete")->setEnabled(TRUE); } |
