diff options
| author | Merov Linden <merov@lindenlab.com> | 2012-12-17 20:16:33 -0800 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2012-12-17 20:16:33 -0800 |
| commit | c2d332a89cb29d54df40f1f120304d871278fb76 (patch) | |
| tree | 9102fe977dfe35767fd009af6f8cdd9607a9d190 /indra/newview/llfloaterinspect.cpp | |
| parent | 3d137bae5c5435dde305323179d8d3d6c9720bad (diff) | |
CHUI-580 : WIP : Added disconnect of callbacks once they're called to prevent filling up the callback queue
Diffstat (limited to 'indra/newview/llfloaterinspect.cpp')
| -rw-r--r-- | indra/newview/llfloaterinspect.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 3636bba355..5a1dfc99ab 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -233,7 +233,7 @@ void LLFloaterInspect::refresh() { mOwnerNameCacheConnection.disconnect(); } - mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::setDirty, this)); + mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this)); } if (LLAvatarNameCache::get(idCreator, &av_name)) @@ -247,7 +247,7 @@ void LLFloaterInspect::refresh() { mCreatorNameCacheConnection.disconnect(); } - mCreatorNameCacheConnection = LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::setDirty, this)); + mCreatorNameCacheConnection = LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetCreatorNameCallback, this)); } row["id"] = obj->getObject()->getID(); @@ -297,6 +297,18 @@ void LLFloaterInspect::dirty() setDirty(); } +void LLFloaterInspect::onGetOwnerNameCallback() +{ + mOwnerNameCacheConnection.disconnect(); + setDirty(); +} + +void LLFloaterInspect::onGetCreatorNameCallback() +{ + mCreatorNameCacheConnection.disconnect(); + setDirty(); +} + void LLFloaterInspect::draw() { if (mDirty) |
