diff options
author | Rick Pasetto <rick@lindenlab.com> | 2009-10-26 13:05:54 -0700 |
---|---|---|
committer | Rick Pasetto <rick@lindenlab.com> | 2009-10-26 13:05:54 -0700 |
commit | 1d67a9084199910d35a44ac427a07fc1d9d6a4fd (patch) | |
tree | 4d942a13d1fd358a8a10a67554ea9a85b7f04c6f /indra/newview/llviewerinventory.cpp | |
parent | 19fc3fb32c3cd95fcfb5708b59b5620e506c5179 (diff) | |
parent | e84ff39e4c7c5b028a6b8b4f6dc5d37c525eb1c4 (diff) |
merge with remote repo
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 7e88320f49..57a4117d5d 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -657,7 +657,6 @@ void LLViewerInventoryCategory::changeType(LLAssetType::EType new_folder_type) setPreferredType(new_folder_type); gInventory.addChangedMask(LLInventoryObserver::LABEL, folder_id); - gInventory.updateLinkedObjects(folder_id); } ///---------------------------------------------------------------------------- @@ -990,7 +989,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 +1002,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); } |