From 7c34cd8eb670ad559f4d1af58296ae57578c8e47 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 11 Dec 2009 20:14:23 +0000 Subject: EXT-3408: Added support for secondlife:///app/classified SLurls I added a handler for this SLurl type that displays the classifieds details in the side tray. In order to do this, you have to open the profile of the classified's creator first. Which means that I have to ask the server for the classified's description in order to get the creator id. This is done with an LLAvatarPropertiesObserver observer. One complication here is that this observer takes the avatar id as a parameter, but we don't know that (that's what we're trying to find out) - so I made it possible to pass in a null avatar id - it's only used to filter out non-interested observers in the notifyObserver() call. --- indra/newview/llavatarpropertiesprocessor.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/newview/llavatarpropertiesprocessor.cpp') diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp index 7cda2d31e6..33e5046f50 100644 --- a/indra/newview/llavatarpropertiesprocessor.cpp +++ b/indra/newview/llavatarpropertiesprocessor.cpp @@ -440,11 +440,17 @@ void LLAvatarPropertiesProcessor::notifyObservers(const LLUUID& id,void* data, E // Copy the map (because observers may delete themselves when updated?) LLAvatarPropertiesProcessor::observer_multimap_t observers = mObservers; - observer_multimap_t::iterator oi = observers.lower_bound(id); - observer_multimap_t::iterator end = observers.upper_bound(id); + observer_multimap_t::iterator oi = observers.begin(); + observer_multimap_t::iterator end = observers.end(); for (; oi != end; ++oi) { - oi->second->processProperties(data,type); + // only notify observers for the same agent, or if the observer + // didn't know the agent ID and passed a NULL id. + const LLUUID &agent_id = oi->first; + if (agent_id == id || agent_id.isNull()) + { + oi->second->processProperties(data,type); + } } } -- cgit v1.2.3