summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-07-23 23:41:12 +0000
committerLoren Shih <seraph@lindenlab.com>2009-07-23 23:41:12 +0000
commit363de6c3bc231183224aed8ba287efe450adb00b (patch)
treea75bd8d0449ab119f25db4b0024989cba0b71697 /indra/newview/llviewerinventory.cpp
parent80deb2a5358e5e912455a781b0d4aa5f29080e30 (diff)
svn merge -r 127683:128178 svn+ssh://svn.lindenlab.com/svn/linden/branches/avatar-pipeline/folder-links__merge__viewer-2.0.0.3-r127634 into svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3
For DEV-36425 : Viewer merge for Folder Links and Types [VIEWER] Test plans - EXTERNAL * [ Test against a 1.30 server ] * Test various inventory operations -- move, copy, paste-as-link, etc. on both folders and inventory items. * Test ability to change user-created folder types. Test inventory operations on these folder types. Test plans - INTERNAL * Test against any inventory smoke tests. * See test plan in QAR-1643 for full FolderLinks&Types test plan.
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 54b0a4f568..66da7d89fb 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -403,7 +403,8 @@ void LLViewerInventoryCategory::updateParentOnServer(BOOL restamp) const
void LLViewerInventoryCategory::updateServer(BOOL is_new) const
{
// communicate that change with the server.
- if(LLAssetType::AT_NONE != mPreferredType)
+
+ if (LLAssetType::lookupIsProtectedCategoryType(mPreferredType))
{
LLNotifications::instance().add("CannotModifyProtectedCategories");
return;
@@ -427,7 +428,7 @@ void LLViewerInventoryCategory::removeFromServer( void )
llinfos << "Removing inventory category " << mUUID << " from server."
<< llendl;
// communicate that change with the server.
- if(LLAssetType::AT_NONE != mPreferredType)
+ if(LLAssetType::lookupIsProtectedCategoryType(mPreferredType))
{
LLNotifications::instance().add("CannotRemoveProtectedCategories");
return;
@@ -977,7 +978,10 @@ LLAssetType::EType LLViewerInventoryItem::getType() const
{
return linked_item->getType();
}
-
+ if (const LLViewerInventoryCategory *linked_category = getLinkedCategory())
+ {
+ return linked_category->getType();
+ }
return LLInventoryItem::getType();
}
@@ -997,6 +1001,10 @@ const std::string& LLViewerInventoryItem::getName() const
{
return linked_item->getName();
}
+ if (const LLViewerInventoryCategory *linked_category = getLinkedCategory())
+ {
+ return linked_category->getName();
+ }
return LLInventoryItem::getName();
}