diff options
Diffstat (limited to 'indra/newview/llavatariconctrl.cpp')
-rwxr-xr-x | indra/newview/llavatariconctrl.cpp | 5 |
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); } } |