summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-10-22 00:25:11 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-10-22 00:25:11 +0000
commitc7786aa5b614d1c88359bacbe9bd447f5acdd84c (patch)
tree68008bf8d24ea824c486922441fa4c8b7fc30f46 /indra/newview/llviewerinventory.cpp
parent0041d485b1c5a1b18c9d5b2ae016f2c1e5ea6b8e (diff)
Merging revisions 2146-2150 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0-3, respecting ancestry
* Bugs: EXT-1752 EXT-1754
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 7e88320f49..1ad60d9a97 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -990,7 +990,7 @@ const std::string NEW_LSL_NAME = "New Script"; // *TODO:Translate? (probably not
const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably not)
const std::string NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not)
-void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, const LLSD& userdata)
+void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, const LLSD& userdata, const LLUUID& default_parent_uuid)
{
std::string type = userdata.asString();
@@ -1003,15 +1003,22 @@ void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, co
a_type = LLAssetType::AT_OUTFIT;
if ("my_otfts" == type)
a_type = LLAssetType::AT_MY_OUTFITS;
- LLUUID category;
+
+ LLUUID parent_id;
if (bridge)
{
- category = gInventory.createNewCategory(bridge->getUUID(), a_type, LLStringUtil::null);
+ parent_id = bridge->getUUID();
+ }
+ else if (default_parent_uuid.notNull())
+ {
+ parent_id = default_parent_uuid;
}
else
{
- category = gInventory.createNewCategory(gInventory.getRootFolderID(), a_type, LLStringUtil::null);
+ parent_id = gInventory.getRootFolderID();
}
+
+ LLUUID category = gInventory.createNewCategory(parent_id, a_type, LLStringUtil::null);
gInventory.notifyObservers();
folder->setSelectionByID(category, TRUE);
}