SH-4613 WIP - add CREATE mask bit for newly created items in AISUpdate::doUpdate() - needed for some inventory observers.
parent
fd2d812236
commit
c0d780cb44
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue