diff options
| author | Oz Linden <oz@lindenlab.com> | 2011-07-21 15:02:03 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2011-07-21 15:02:03 -0400 |
| commit | c118ec209907618c77613990fe2359d4f92802e6 (patch) | |
| tree | b2fa95d1fa1563cdee89d2bf035b680c64918c0f /indra/newview/llinventoryobserver.cpp | |
| parent | 54bb91fd03d0c2f2600993274c59ae89324eeb03 (diff) | |
| parent | 67e365ba57bb7024a64bc0663782cd7f06b4a5cc (diff) | |
merge up changes for 2.8.0 release
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) { |
