summaryrefslogtreecommitdiff
path: root/indra/newview/llavatariconctrl.cpp
diff options
context:
space:
mode:
authorSimon Linden <simon@lindenlab.com>2014-07-18 22:39:50 +0000
committerSimon Linden <simon@lindenlab.com>2014-07-18 22:39:50 +0000
commit7021288859036789dc268233cc1a3401d6082721 (patch)
tree2d6a4d9e87785a8bc236215e5e0102a553a0ee5f /indra/newview/llavatariconctrl.cpp
parent7714c7679da7c6c28c3f3f09af6b586a680dc26c (diff)
parent19bc1ee671df2f89d990dfe8aadea1d9ea424e82 (diff)
Pull in viewer-lion to cut off DRTVWR-373
Diffstat (limited to 'indra/newview/llavatariconctrl.cpp')
-rwxr-xr-xindra/newview/llavatariconctrl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp
index 746b541f9d..b89b0d9900 100755
--- a/indra/newview/llavatariconctrl.cpp
+++ b/indra/newview/llavatariconctrl.cpp
@@ -247,7 +247,7 @@ void LLAvatarIconCtrl::setValue(const LLSD& value)
{
LLAvatarPropertiesProcessor* app =
LLAvatarPropertiesProcessor::getInstance();
- if (mAvatarId.notNull())
+ if (mAvatarId.notNull() && mAvatarId != value.asUUID())
{
app->removeObserver(mAvatarId, this);
}
@@ -255,6 +255,7 @@ void LLAvatarIconCtrl::setValue(const LLSD& value)
if (mAvatarId != value.asUUID())
{
mAvatarId = value.asUUID();
+ app->addObserver(mAvatarId, this);
// *BUG: This will return stale icons if a user changes their
// profile picture. However, otherwise we send too many upstream
@@ -270,7 +271,7 @@ void LLAvatarIconCtrl::setValue(const LLSD& value)
// People API, rather than sending AvatarPropertyRequest
// messages. People API already hits the user table.
LLIconCtrl::setValue(mDefaultIconName);
- app->addObserver(mAvatarId, this);
+ // duplicated requests are filtered later if there are any
app->sendAvatarPropertiesRequest(mAvatarId);
}
}