summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryobserver.cpp
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2011-07-11 13:52:46 -0400
committerprep <prep@lindenlab.com>2011-07-11 13:52:46 -0400
commitb905b231c93390fdfdccbc255fa1950a83d6eb75 (patch)
treeaa673669d27d95942e349462f7c88882d947d48d /indra/newview/llinventoryobserver.cpp
parent572a1734a5230bb4ecbc3cc1e5ff842e582e9b49 (diff)
parent80e60371f8be32719dd19467fd2def80e994aa2d (diff)
merge
Diffstat (limited to 'indra/newview/llinventoryobserver.cpp')
-rw-r--r--indra/newview/llinventoryobserver.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 6bf19e346d..ceba4a0191 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -601,6 +601,34 @@ void LLInventoryAddedObserver::changed(U32 mask)
}
}
+void LLInventoryCategoryAddedObserver::changed(U32 mask)
+{
+ if (!(mask & LLInventoryObserver::ADD))
+ {
+ return;
+ }
+
+ const LLInventoryModel::changed_items_t& changed_ids = gInventory.getChangedIDs();
+
+ for (LLInventoryModel::changed_items_t::const_iterator cit = changed_ids.begin(); cit != changed_ids.end(); ++cit)
+ {
+ LLViewerInventoryCategory* cat = gInventory.getCategory(*cit);
+
+ if (cat)
+ {
+ mAddedCategories.push_back(cat);
+ }
+ }
+
+ if (!mAddedCategories.empty())
+ {
+ done();
+
+ mAddedCategories.clear();
+ }
+}
+
+
LLInventoryTransactionObserver::LLInventoryTransactionObserver(const LLTransactionID& transaction_id) :
mTransactionID(transaction_id)
{