diff options
author | andreykproductengine <akleshchev@productengine.com> | 2015-12-07 18:54:52 +0200 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2015-12-07 18:54:52 +0200 |
commit | 9efda8ac70b138a8121a83d6ae58a25be0fcebd1 (patch) | |
tree | 3b837c6c9c2e771ce3c49cc1325dd840a0bc5fd4 /indra | |
parent | b78fe654d59c28315645a2e7189cb75e7b1431ac (diff) |
MAINT-5933 FIXED When a new library avatar folder is created in Clothing folder, folder rename is grayed out until relog
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llaisapi.cpp | 18 | ||||
-rwxr-xr-x | indra/newview/llinventorymodel.cpp | 2 |
2 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 714b456ae7..d8b6cc729d 100755 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -567,13 +567,25 @@ void AISUpdate::parseCategory(const LLSD& category_map) parseDescendentCount(category_id, category_map["_embedded"]); } - LLPointer<LLViewerInventoryCategory> new_cat(new LLViewerInventoryCategory(category_id)); + LLPointer<LLViewerInventoryCategory> new_cat; LLViewerInventoryCategory *curr_cat = gInventory.getCategory(category_id); if (curr_cat) { // Default to current values where not provided. - new_cat->copyViewerCategory(curr_cat); - } + new_cat = new LLViewerInventoryCategory(curr_cat); + } + else + { + if (category_map.has("agent_id")) + { + new_cat = new LLViewerInventoryCategory(category_map["agent_id"].asUUID()); + } + else + { + LL_DEBUGS() << "No owner provided, folder might be assigned wrong owner" << LL_ENDL; + new_cat = new LLViewerInventoryCategory(LLUUID::null); + } + } BOOL rv = new_cat->unpackMessage(category_map); // *NOTE: unpackMessage does not unpack version or descendent count. //if (category_map.has("version")) diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 0bad4702e0..e123a3e68a 100755 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1075,7 +1075,7 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat, U32 else { // add this category - LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat->getParentUUID()); + LLPointer<LLViewerInventoryCategory> new_cat = new LLViewerInventoryCategory(cat->getOwnerID()); new_cat->copyViewerCategory(cat); addCategory(new_cat); |