summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterinspect.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2013-03-25 12:19:02 -0700
committersimon <none@none>2013-03-25 12:19:02 -0700
commita976f5c217ce97c70a7e151b9a490e6a6ebf1396 (patch)
tree8d86c9060ac05b34b1a9dfd25f03451e18dcc326 /indra/newview/llfloaterinspect.cpp
parentcc260a635674c56d8fab88a5cd4dd188b4c9ac9c (diff)
parent98a82c50d539451e1931826ca75fbc01d611806d (diff)
Pull and merge downstream code with CHUI viewer-development by way of viewer-lion
Diffstat (limited to 'indra/newview/llfloaterinspect.cpp')
-rw-r--r--indra/newview/llfloaterinspect.cpp46
1 files changed, 33 insertions, 13 deletions
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index cece8d299c..5a1dfc99ab 100644
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -46,7 +46,9 @@
LLFloaterInspect::LLFloaterInspect(const LLSD& key)
: LLFloater(key),
- mDirty(FALSE)
+ mDirty(FALSE),
+ mOwnerNameCacheConnection(),
+ mCreatorNameCacheConnection()
{
mCommitCallbackRegistrar.add("Inspect.OwnerProfile", boost::bind(&LLFloaterInspect::onClickOwnerProfile, this));
mCommitCallbackRegistrar.add("Inspect.CreatorProfile", boost::bind(&LLFloaterInspect::onClickCreatorProfile, this));
@@ -67,6 +69,14 @@ BOOL LLFloaterInspect::postBuild()
LLFloaterInspect::~LLFloaterInspect(void)
{
+ if (mOwnerNameCacheConnection.connected())
+ {
+ mOwnerNameCacheConnection.disconnect();
+ }
+ if (mCreatorNameCacheConnection.connected())
+ {
+ mCreatorNameCacheConnection.disconnect();
+ }
if(!LLFloaterReg::instanceVisible("build"))
{
if(LLToolMgr::getInstance()->getBaseTool() == LLToolCompInspect::getInstance())
@@ -80,7 +90,6 @@ LLFloaterInspect::~LLFloaterInspect(void)
{
LLFloaterReg::showInstance("build", LLSD(), TRUE);
}
- //sInstance = NULL;
}
void LLFloaterInspect::onOpen(const LLSD& key)
@@ -167,15 +176,6 @@ LLUUID LLFloaterInspect::getSelectedUUID()
return LLUUID::null;
}
-void LLFloaterInspect::onGetAvNameCallback(const LLUUID& idCreator, const LLAvatarName& av_name, void* FloaterPtr)
-{
- if (FloaterPtr)
- {
- LLFloaterInspect* floater = (LLFloaterInspect*)FloaterPtr;
- floater->dirty();
- }
-}
-
void LLFloaterInspect::refresh()
{
LLUUID creator_id;
@@ -229,7 +229,11 @@ void LLFloaterInspect::refresh()
else
{
owner_name = LLTrans::getString("RetrievingData");
- LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
+ if (mOwnerNameCacheConnection.connected())
+ {
+ mOwnerNameCacheConnection.disconnect();
+ }
+ mOwnerNameCacheConnection = LLAvatarNameCache::get(idOwner, boost::bind(&LLFloaterInspect::onGetOwnerNameCallback, this));
}
if (LLAvatarNameCache::get(idCreator, &av_name))
@@ -239,7 +243,11 @@ void LLFloaterInspect::refresh()
else
{
creator_name = LLTrans::getString("RetrievingData");
- LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetAvNameCallback, _1, _2, this));
+ if (mCreatorNameCacheConnection.connected())
+ {
+ mCreatorNameCacheConnection.disconnect();
+ }
+ mCreatorNameCacheConnection = LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetCreatorNameCallback, this));
}
row["id"] = obj->getObject()->getID();
@@ -289,6 +297,18 @@ void LLFloaterInspect::dirty()
setDirty();
}
+void LLFloaterInspect::onGetOwnerNameCallback()
+{
+ mOwnerNameCacheConnection.disconnect();
+ setDirty();
+}
+
+void LLFloaterInspect::onGetCreatorNameCallback()
+{
+ mCreatorNameCacheConnection.disconnect();
+ setDirty();
+}
+
void LLFloaterInspect::draw()
{
if (mDirty)