diff options
| author | Richard Linden <none@none> | 2011-07-07 13:34:13 -0700 |
|---|---|---|
| committer | Richard Linden <none@none> | 2011-07-07 13:34:13 -0700 |
| commit | 88a90aabcb5bdede24bb451d443239e1e116c4ea (patch) | |
| tree | 9399a4aefc1a9017986e1c29f9c9077d6e3c74c7 /indra/newview/llinventoryobserver.cpp | |
| parent | 66dcc72870b19c6ada65a643ca33c779c9c9989b (diff) | |
| parent | 8f7579e4e46bb8da9fece3125ae31c3bb885be96 (diff) | |
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/newview/llinventoryobserver.cpp')
| -rw-r--r-- | indra/newview/llinventoryobserver.cpp | 28 |
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) { |
