diff options
-rw-r--r-- | indra/newview/llfloaterprofile.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llfloaterprofile.h | 1 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llpanelprofile.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewerdisplayname.cpp | 8 |
5 files changed, 38 insertions, 0 deletions
diff --git a/indra/newview/llfloaterprofile.cpp b/indra/newview/llfloaterprofile.cpp index a4a9fe8410..624075e9fd 100644 --- a/indra/newview/llfloaterprofile.cpp +++ b/indra/newview/llfloaterprofile.cpp @@ -137,6 +137,20 @@ bool LLFloaterProfile::isPickTabSelected() return mPanelProfile->isPickTabSelected(); } +void LLFloaterProfile::refreshName() +{ + if (!mNameCallbackConnection.connected()) + { + mNameCallbackConnection = LLAvatarNameCache::get(mAvatarId, boost::bind(&LLFloaterProfile::onAvatarNameCache, this, _1, _2)); + } + + LLPanelProfileSecondLife *panel = findChild<LLPanelProfileSecondLife>("panel_profile_secondlife"); + if (panel) + { + panel->refreshName(); + } +} + void LLFloaterProfile::showClassified(const LLUUID& classified_id, bool edit) { mPanelProfile->showClassified(classified_id, edit); diff --git a/indra/newview/llfloaterprofile.h b/indra/newview/llfloaterprofile.h index 36023077d3..c2b90a1dce 100644 --- a/indra/newview/llfloaterprofile.h +++ b/indra/newview/llfloaterprofile.h @@ -49,6 +49,7 @@ public: void createPick(const LLPickData &data); void showPick(const LLUUID& pick_id = LLUUID::null); bool isPickTabSelected(); + void refreshName(); void showClassified(const LLUUID& classified_id = LLUUID::null, bool edit = false); diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 195244ea22..2f4da59cfd 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -973,6 +973,14 @@ void LLPanelProfileSecondLife::updateData() } } +void LLPanelProfileSecondLife::refreshName() +{ + if (!mAvatarNameCacheConnection.connected()) + { + mAvatarNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCache, this, _1, _2)); + } +} + void LLPanelProfileSecondLife::resetData() { resetLoading(); @@ -2576,6 +2584,11 @@ void LLPanelProfile::updateData() } } +void LLPanelProfile::refreshName() +{ + mPanelSecondlife->refreshName(); +} + void LLPanelProfile::createPick(const LLPickData &data) { mTabContainer->selectTabPanel(mPanelPicks); diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index b363bd3fd2..41533c137f 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -96,6 +96,7 @@ public: * Sends update data request to server. */ void updateData() override; + void refreshName(); void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name); @@ -368,6 +369,7 @@ public: BOOL postBuild() override; void updateData() override; + void refreshName(); void onOpen(const LLSD& key) override; diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp index d444d47624..cec08c4f15 100644 --- a/indra/newview/llviewerdisplayname.cpp +++ b/indra/newview/llviewerdisplayname.cpp @@ -30,6 +30,8 @@ // viewer includes #include "llagent.h" +#include "llfloaterprofile.h" +#include "llfloaterreg.h" #include "llviewerregion.h" #include "llvoavatar.h" @@ -206,6 +208,12 @@ class LLDisplayNameUpdate : public LLHTTPNode { LLViewerDisplayName::sNameChangedSignal(); } + + LLFloaterProfile* profile_floater = dynamic_cast<LLFloaterProfile*>(LLFloaterReg::findInstance("profile", LLSD().with("id", agent_id))); + if (profile_floater) + { + profile_floater->refreshName(); + } } }; |