diff options
author | Seth ProductEngine <slitovchuk@productengine.com> | 2011-04-12 03:00:05 +0300 |
---|---|---|
committer | Seth ProductEngine <slitovchuk@productengine.com> | 2011-04-12 03:00:05 +0300 |
commit | 67f33bff1b078e10149151af32e62ea88e7484c3 (patch) | |
tree | 8f57c28024527917fa695c4779ca4f1d3f8435b3 /indra/newview/llinventorymodel.cpp | |
parent | fa1827fa32f5dc046b17cde1ddbac8316f061793 (diff) |
STORM-1042 FIXED Fixed the inventory observers of newly added items.
The problem was caused by an outdated message name stored in LLInventoryObserver::mMessageName and not updated properly in LLInventoryModel::notifyObservers().
The message name used in LLInventoryAddedObserver::changed() was the name of the message most recently passed by LLInventoryModel::notifyObservers(), instead of the name of the latest actually received message. Using the most recent message name in this case fixed the problem.
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r-- | indra/newview/llinventorymodel.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 53835f0166..b1975c7261 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1059,12 +1059,11 @@ void LLInventoryModel::idleNotifyObservers() { return; } - notifyObservers(""); + notifyObservers(); } // Call this method when it's time to update everyone on a new state. -// The optional argument 'service_name' is used by Agent Inventory Service [DEV-20328] -void LLInventoryModel::notifyObservers(const std::string service_name) +void LLInventoryModel::notifyObservers() { if (mIsNotifyObservers) { @@ -1081,15 +1080,7 @@ void LLInventoryModel::notifyObservers(const std::string service_name) { LLInventoryObserver* observer = *iter; - if (service_name.empty()) - { - observer->changed(mModifyMask); - } - else - { - observer->mMessageName = service_name; - observer->changed(mModifyMask); - } + observer->changed(mModifyMask); // safe way to increment since changed may delete entries! (@!##%@!@&*!) iter = mObservers.upper_bound(observer); @@ -1187,7 +1178,7 @@ void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content) { changes |= gInventory.updateItem(*it); } - gInventory.notifyObservers("fetchinventory"); + gInventory.notifyObservers(); gViewerWindow->getWindow()->decBusyCount(); } @@ -1196,7 +1187,7 @@ void LLInventoryModel::fetchInventoryResponder::error(U32 status, const std::str { llinfos << "fetchInventory::error " << status << ": " << reason << llendl; - gInventory.notifyObservers("fetchinventory"); + gInventory.notifyObservers(); } bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) const |