diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-11-25 16:52:58 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-11-25 16:52:58 -0500 |
commit | c0d780cb4473c02e885c67fbc1bc30e87536d1b8 (patch) | |
tree | eae277332834320c64ebcce3e4e90e5247aeca41 /indra | |
parent | fd2d81223697bad850b979f308c271ca370eccd3 (diff) |
SH-4613 WIP - add CREATE mask bit for newly created items in AISUpdate::doUpdate() - needed for some inventory observers.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llaisapi.cpp | 5 | ||||
-rwxr-xr-x | indra/newview/llinventorymodel.cpp | 5 | ||||
-rwxr-xr-x | indra/newview/llinventorymodel.h | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 14978662f6..38eb34676e 100755 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -33,6 +33,7 @@ #include "llinventorymodel.h" #include "llsdutil.h" #include "llviewerregion.h" +#include "llinventoryobserver.h" ///---------------------------------------------------------------------------- /// Classes for AISv3 support. @@ -781,7 +782,7 @@ void AISUpdate::doUpdate() LLUUID category_id(create_it->first); LLPointer<LLViewerInventoryCategory> new_category = create_it->second; - gInventory.updateCategory(new_category); + gInventory.updateCategory(new_category, LLInventoryObserver::CREATE); LL_DEBUGS("Inventory") << "created category " << category_id << LL_ENDL; } @@ -818,7 +819,7 @@ void AISUpdate::doUpdate() // cases. Maybe break out the update/create cases, in which // case this is create. LL_DEBUGS("Inventory") << "created item " << item_id << LL_ENDL; - gInventory.updateItem(new_item); + gInventory.updateItem(new_item, LLInventoryObserver::CREATE); } // UPDATE ITEMS diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 6b1bf69b5e..891d7c821c 100755 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -944,7 +944,7 @@ LLInventoryModel::item_array_t* LLInventoryModel::getUnlockedItemArray(const LLU // Calling this method with an inventory category will either change // an existing item with the matching id, or it will add the category. -void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat) +void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat, U32 mask) { if(cat->getUUID().isNull()) { @@ -961,7 +961,6 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat) if(old_cat) { // We already have an old category, modify it's values - U32 mask = LLInventoryObserver::NONE; LLUUID old_parent_id = old_cat->getParentUUID(); LLUUID new_parent_id = cat->getParentUUID(); if(old_parent_id != new_parent_id) @@ -1128,6 +1127,7 @@ void LLInventoryModel::onAISUpdateReceived(const std::string& context, const LLS llinfos << "elapsed: " << timer.getElapsedTimeF32() << llendl; } +// Does not appear to be used currently. void LLInventoryModel::onItemUpdated(const LLUUID& item_id, const LLSD& updates, bool update_parent_version) { U32 mask = LLInventoryObserver::NONE; @@ -1168,6 +1168,7 @@ void LLInventoryModel::onItemUpdated(const LLUUID& item_id, const LLSD& updates, } } +// Not used? void LLInventoryModel::onCategoryUpdated(const LLUUID& cat_id, const LLSD& updates) { U32 mask = LLInventoryObserver::NONE; diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index ab8bbac6d8..6b6d077a4b 100755 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -309,7 +309,7 @@ public: // NOTE: In usage, you will want to perform cache accounting // operations in accountForUpdate() or LLViewerInventoryCategory:: // updateServer() before calling this method. - void updateCategory(const LLViewerInventoryCategory* cat); + void updateCategory(const LLViewerInventoryCategory* cat, U32 mask = 0); // Move the specified object id to the specified category and // update the internal structures. No cache accounting, |