summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llinventorymodel.cpp6
-rwxr-xr-xindra/newview/llinventorymodel.h2
-rwxr-xr-xindra/newview/llinventoryobserver.cpp4
-rwxr-xr-xindra/newview/llinventoryobserver.h1
4 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index e9bbf3a7cd..1ad70492ca 100755
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -774,9 +774,8 @@ bool LLInventoryModel::isInventoryUsable() const
// Calling this method with an inventory item will either change an
// existing item with a matching item_id, or will add the item to the
// current inventory.
-U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
+U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask)
{
- U32 mask = LLInventoryObserver::NONE;
if(item->getUUID().isNull())
{
return mask;
@@ -2652,10 +2651,11 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account)
}
U32 changes = 0x0;
+ U32 mask = account ? LLInventoryObserver::CREATE : 0x0;
//as above, this loop never seems to loop more than once per call
for (item_array_t::iterator it = items.begin(); it != items.end(); ++it)
{
- changes |= gInventory.updateItem(*it);
+ changes |= gInventory.updateItem(*it, mask);
}
gInventory.notifyObservers();
gViewerWindow->getWindow()->decBusyCount();
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 339740870d..779319fa67 100755
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -298,7 +298,7 @@ public:
// NOTE: In usage, you will want to perform cache accounting
// operations in LLInventoryModel::accountForUpdate() or
// LLViewerInventoryItem::updateServer() before calling this method.
- U32 updateItem(const LLViewerInventoryItem* item);
+ U32 updateItem(const LLViewerInventoryItem* item, U32 mask = 0);
// Change an existing item with the matching id or add
// the category. No notifcation will be sent to observers. This
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index b025c0786e..011686bfdd 100755
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -467,7 +467,7 @@ void LLInventoryFetchComboObserver::startFetch()
void LLInventoryAddItemByAssetObserver::changed(U32 mask)
{
- if(!(mask & LLInventoryObserver::ADD))
+ if(!(mask & LLInventoryObserver::ADD) || !(mask & LLInventoryObserver::CREATE))
{
return;
}
@@ -528,7 +528,7 @@ bool LLInventoryAddItemByAssetObserver::isAssetWatched( const LLUUID& asset_id )
void LLInventoryAddedObserver::changed(U32 mask)
{
- if (!(mask & LLInventoryObserver::ADD))
+ if (!(mask & LLInventoryObserver::ADD) || !(mask & LLInventoryObserver::CREATE))
{
return;
}
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index c3cd0d761e..dd30513844 100755
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -58,6 +58,7 @@ public:
GESTURE = 64,
REBUILD = 128, // Item UI changed (e.g. item type different)
SORT = 256, // Folder needs to be resorted.
+ CREATE = 512, // With ADD, item has just been created.
ALL = 0xffffffff
};
LLInventoryObserver();