summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterreporter.cpp
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2013-03-11 15:05:47 -0400
committerprep <prep@lindenlab.com>2013-03-11 15:05:47 -0400
commite0c9174609e2457fab7fe6d7291c6ebbd030397c (patch)
treea6f43767b2c3254e501c4ce0af628dfd159ad600 /indra/newview/llfloaterreporter.cpp
parent9514210beb1ae2ec49f1cf15e5a4f7af5ae56657 (diff)
parent207d9fd767895a3470722fb298eeef4f338e479a (diff)
merge
Diffstat (limited to 'indra/newview/llfloaterreporter.cpp')
-rw-r--r--indra/newview/llfloaterreporter.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp
index 25e92dc17e..35b63c5480 100644
--- a/indra/newview/llfloaterreporter.cpp
+++ b/indra/newview/llfloaterreporter.cpp
@@ -103,7 +103,8 @@ LLFloaterReporter::LLFloaterReporter(const LLSD& key)
mPicking( FALSE),
mPosition(),
mCopyrightWarningSeen( FALSE ),
- mResourceDatap(new LLResourceData())
+ mResourceDatap(new LLResourceData()),
+ mAvatarNameCacheConnection()
{
}
@@ -184,6 +185,11 @@ BOOL LLFloaterReporter::postBuild()
// virtual
LLFloaterReporter::~LLFloaterReporter()
{
+ if (mAvatarNameCacheConnection.connected())
+ {
+ mAvatarNameCacheConnection.disconnect();
+ }
+
// child views automatically deleted
mObjectID = LLUUID::null;
@@ -282,10 +288,13 @@ void LLFloaterReporter::getObjectInfo(const LLUUID& object_id)
void LLFloaterReporter::onClickSelectAbuser()
{
- LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE );
+ LLView * button = findChild<LLButton>("select_abuser", TRUE);
+
+ LLFloater * root_floater = gFloaterView->getParentFloater(this);
+ LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE, FALSE, root_floater->getName(), button);
if (picker)
{
- gFloaterView->getParentFloater(this)->addDependentFloater(picker);
+ root_floater->addDependentFloater(picker);
}
}
@@ -307,11 +316,17 @@ void LLFloaterReporter::setFromAvatarID(const LLUUID& avatar_id)
std::string avatar_link = LLSLURL("agent", mObjectID, "inspect").getSLURLString();
getChild<LLUICtrl>("owner_name")->setValue(avatar_link);
- LLAvatarNameCache::get(avatar_id, boost::bind(&LLFloaterReporter::onAvatarNameCache, this, _1, _2));
+ if (mAvatarNameCacheConnection.connected())
+ {
+ mAvatarNameCacheConnection.disconnect();
+ }
+ mAvatarNameCacheConnection = LLAvatarNameCache::get(avatar_id, boost::bind(&LLFloaterReporter::onAvatarNameCache, this, _1, _2));
}
void LLFloaterReporter::onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name)
{
+ mAvatarNameCacheConnection.disconnect();
+
if (mObjectID == avatar_id)
{
mOwnerName = av_name.getCompleteName();