summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-11-14 11:29:02 -0800
committerLeslie Linden <leslie@lindenlab.com>2011-11-14 11:29:02 -0800
commit2f55effd25c035c2af80bd5e6754c96a18f9d7e0 (patch)
tree02d2c153b4e40b9770521ee64fb45fd7176b082c /indra/newview/llinventorybridge.cpp
parent7a31a48536f8a373b4e857ca8b906a6984530a04 (diff)
parentd8e1b48328017eba1c68bcc56a4f67085643988a (diff)
Merge
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 0e1e6265aa..916297abf1 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -195,6 +195,20 @@ BOOL LLInvFVBridge::isLink() const
return mIsLink;
}
+// Is a "System" folder
+// System folders are predefined named folders that have a specific preferred type
+// e.g. "Textures" which has an FT_TEXTURE preferred type.
+// Those are folders used to route incoming items in the current (soon to be obsolete) inventory
+// asset routing.
+// If a folder uses the same name as a predefined folder but is not of the same preferred type
+// or if it has a preferred type but a different name, it will not be considered a system folder.
+// *TODO: Test that logic in all languages
+bool LLInvFVBridge::isSystemFolder() const
+{
+ LLFolderType::EType preferred_type = getPreferredType();
+ return (preferred_type == LLFolderType::FT_NONE ? false : LLViewerFolderType::lookupTypeFromNewCategoryName(getDisplayName()) == preferred_type);
+}
+
/*virtual*/
/**
* @brief Adds this item into clipboard storage
@@ -2027,7 +2041,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
#endif
}
}
- if (move_is_into_outbox && !move_is_from_outbox)
+ else if (move_is_into_outbox && !move_is_from_outbox)
{
dropFolderToOutbox(inv_cat);
}
@@ -3544,10 +3558,12 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
// because they must contain only links to wearable items.
accept = !(move_is_into_current_outfit || move_is_into_outfit);
- if(drop)
+ if(accept && drop)
{
- copy_inventory_from_notecard(LLToolDragAndDrop::getInstance()->getObjectID(),
- LLToolDragAndDrop::getInstance()->getSourceID(), inv_item);
+ copy_inventory_from_notecard(mUUID, // Drop to the chosen destination folder
+ LLToolDragAndDrop::getInstance()->getObjectID(),
+ LLToolDragAndDrop::getInstance()->getSourceID(),
+ inv_item);
}
}
else if(LLToolDragAndDrop::SOURCE_LIBRARY == source)