diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-11-19 13:36:27 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-11-19 13:36:27 -0500 |
commit | afbc78d0398d58c44b2b1fb692ce1a27577fc4b1 (patch) | |
tree | da4c6c1bd6e87b81b10a5b7bed6429373e6a89eb /indra/newview/llinventorymodel.cpp | |
parent | 6cea252986ef6d33f2e37333a286362b8e0272c5 (diff) | |
parent | 3e46ee6274d04d91657da92953b167fe94eb7f59 (diff) |
Merging viewer-2-0 changes into avatar-pipeline branch
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r-- | indra/newview/llinventorymodel.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 38a417f1a2..fbaab385fe 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -509,7 +509,7 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id, } } -void LLInventoryModel::updateLinkedItems(const LLUUID& object_id) +void LLInventoryModel::addChangedMaskForLinks(const LLUUID& object_id, U32 mask) { const LLInventoryObject *obj = getObject(object_id); if (!obj || obj->getIsLinkType()) @@ -532,7 +532,7 @@ void LLInventoryModel::updateLinkedItems(const LLUUID& object_id) cat_iter++) { LLViewerInventoryCategory *linked_cat = (*cat_iter); - addChangedMask(LLInventoryObserver::LABEL, linked_cat->getUUID()); + addChangedMask(mask, linked_cat->getUUID()); }; for (LLInventoryModel::item_array_t::iterator iter = item_array.begin(); @@ -540,9 +540,8 @@ void LLInventoryModel::updateLinkedItems(const LLUUID& object_id) iter++) { LLViewerInventoryItem *linked_item = (*iter); - addChangedMask(LLInventoryObserver::LABEL, linked_item->getUUID()); + addChangedMask(mask, linked_item->getUUID()); }; - notifyObservers(); } const LLUUID& LLInventoryModel::getLinkedItemID(const LLUUID& object_id) const @@ -1133,6 +1132,14 @@ void LLInventoryModel::notifyObservers(const std::string service_name) llwarns << "Call was made to notifyObservers within notifyObservers!" << llendl; return; } + + if ((mModifyMask == LLInventoryObserver::NONE) && (service_name == "")) + { + mModifyMask = LLInventoryObserver::NONE; + mChangedItemIDs.clear(); + return; + } + mIsNotifyObservers = TRUE; for (observer_list_t::iterator iter = mObservers.begin(); iter != mObservers.end(); ) @@ -1180,7 +1187,7 @@ void LLInventoryModel::addChangedMask(U32 mask, const LLUUID& referent) // not sure what else might need to be accounted for this. if (mModifyMask & LLInventoryObserver::LABEL) { - updateLinkedItems(referent); + addChangedMaskForLinks(referent, LLInventoryObserver::LABEL); } } @@ -1199,7 +1206,7 @@ void LLInventoryModel::mock(const LLUUID& root_id) root_id, LLUUID::null, LLAssetType::AT_CATEGORY, - LLFolderType::lookupNewCategoryName(LLFolderType::FT_ROOT_CATEGORY), + LLFolderType::lookupNewCategoryName(LLFolderType::FT_ROOT_INVENTORY), gAgent.getID()); addCategory(cat); gInventory.buildParentChildMap(); |