diff options
| author | Lynx Linden <lynx@lindenlab.com> | 2009-12-11 20:14:23 +0000 |
|---|---|---|
| committer | Lynx Linden <lynx@lindenlab.com> | 2009-12-11 20:14:23 +0000 |
| commit | 7c34cd8eb670ad559f4d1af58296ae57578c8e47 (patch) | |
| tree | 9f016bee88f73a57ab77f013899079209aa9e4bc /indra/newview/llavatarpropertiesprocessor.cpp | |
| parent | eda8634b17133df5f3104d96ad56d3626a90aad8 (diff) | |
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.
Diffstat (limited to 'indra/newview/llavatarpropertiesprocessor.cpp')
| -rw-r--r-- | indra/newview/llavatarpropertiesprocessor.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
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); + } } } |
