diff options
author | Jonathan Yap <none@none> | 2013-11-19 16:56:17 -0500 |
---|---|---|
committer | Jonathan Yap <none@none> | 2013-11-19 16:56:17 -0500 |
commit | 410a084f9a2e030efda635f5a51280b599ab7f78 (patch) | |
tree | 2c2f095cee8cf0b233d59eee2c8d99ad68c44c70 /indra/newview/llmutelist.cpp | |
parent | dad992ea31b6b823c316400e61d50d1aa9e52330 (diff) | |
parent | fcc885d4fc5ef63dad33e89a9324edc39d466d37 (diff) |
STORM-1980 Merge changes Oz made (new way of detecting an agent has changed regions)
Modify code to make use of the changed callback
Diffstat (limited to 'indra/newview/llmutelist.cpp')
-rwxr-xr-x | indra/newview/llmutelist.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 54522bb7f6..0720d443f8 100755 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -251,6 +251,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) llinfos << "Muting by name " << mute.mName << llendl; updateAdd(mute); notifyObservers(); + notifyObserversDetailed(mute); return TRUE; } else @@ -299,6 +300,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags) llinfos << "Muting " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << llendl; updateAdd(localmute); notifyObservers(); + notifyObserversDetailed(localmute); if(!(localmute.mFlags & LLMute::flagParticles)) { //Kill all particle systems owned by muted task @@ -396,6 +398,7 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags) } // Must be after erase. + notifyObserversDetailed(localmute); setLoaded(); // why is this here? -MG } else @@ -409,6 +412,7 @@ BOOL LLMuteList::remove(const LLMute& mute, U32 flags) updateRemove(mute); mLegacyMutes.erase(legacy_it); // Must be after erase. + notifyObserversDetailed(mute); setLoaded(); // why is this here? -MG } } @@ -762,3 +766,16 @@ void LLMuteList::notifyObservers() it = mObservers.upper_bound(observer); } } + +void LLMuteList::notifyObserversDetailed(const LLMute& mute) +{ + for (observer_set_t::iterator it = mObservers.begin(); + it != mObservers.end(); + ) + { + LLMuteListObserver* observer = *it; + observer->onChangeDetailed(mute); + // In case onChange() deleted an entry. + it = mObservers.upper_bound(observer); + } +} |