summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-05-14 17:31:56 -0400
committerLoren Shih <seraph@lindenlab.com>2010-05-14 17:31:56 -0400
commit50fad31f09b394b409df710bdabd66341ae2135c (patch)
tree2f068bbea2e0ca354fa346b570bb4f20430f3cba /indra/newview/llviewerinventory.cpp
parentd9f519d55c4b5cff0fa56d2130a7e25a144be9ff (diff)
EXT-7353 FIXED short cuts (links) to textures should show up in the texture picker
Links in general will now show up for all filtered inventory views of their associated types.
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 49748c59e8..ac70be029a 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1653,6 +1653,20 @@ bool LLViewerInventoryItem::checkPermissionsSet(PermissionMask mask) const
return ((curr_mask & mask) == mask);
}
+PermissionMask LLViewerInventoryItem::getPermissionMask() const
+{
+ const LLPermissions& permissions = getPermissions();
+
+ BOOL copy = permissions.allowCopyBy(gAgent.getID());
+ BOOL mod = permissions.allowModifyBy(gAgent.getID());
+ BOOL xfer = permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID());
+ PermissionMask perm_mask = 0;
+ if (copy) perm_mask |= PERM_COPY;
+ if (mod) perm_mask |= PERM_MODIFY;
+ if (xfer) perm_mask |= PERM_TRANSFER;
+ return perm_mask;
+}
+
//----------
void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name)