diff options
-rw-r--r-- | indra/newview/llavatariconctrl.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.cpp | 2 |
2 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index a48fbf31a6..52bec5d434 100644 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -299,7 +299,13 @@ bool LLAvatarIconCtrl::updateFromCache() //virtual void LLAvatarIconCtrl::processProperties(void* data, EAvatarProcessorType type) { - if (APT_PROPERTIES_LEGACY == type) + // Both APT_PROPERTIES_LEGACY and APT_PROPERTIES have icon data. + // 'Legacy' is cheaper to request so LLAvatarIconCtrl issues that, + // but own icon should track any source for the sake of timely updates. + // + // If this needs to change, make sure to update onCommitProfileImage + // to issue right kind of request + if (APT_PROPERTIES_LEGACY == type) { LLAvatarLegacyData* avatar_data = static_cast<LLAvatarLegacyData*>(data); if (avatar_data) @@ -313,6 +319,20 @@ void LLAvatarIconCtrl::processProperties(void* data, EAvatarProcessorType type) updateFromCache(); } } + else if (APT_PROPERTIES == type) + { + LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data); + if (avatar_data) + { + if (avatar_data->avatar_id != mAvatarId) + { + return; + } + + LLAvatarIconIDCache::getInstance()->add(mAvatarId, avatar_data->image_id); + updateFromCache(); + } + } } void LLAvatarIconCtrl::onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index f014dff470..55ddeed4ec 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -1806,7 +1806,7 @@ void LLPanelProfileSecondLife::onCommitProfileImage(const LLUUID& id) if (result) { LLAvatarIconIDCache::getInstance()->add(gAgentID, id); - // Should trigger callbacks in icon controls + // Should trigger callbacks in icon controls (or request Legacy) LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgentID); } }; |