From 946bdc1ee352618f0d333292272aceb48b6d8dd8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 8 Aug 2022 22:38:56 +0300 Subject: [PATCH 1/3] SL-14556 Profile floater does not update after a name change --- indra/newview/llfloaterprofile.cpp | 14 ++++++++++++++ indra/newview/llfloaterprofile.h | 1 + indra/newview/llpanelprofile.cpp | 13 +++++++++++++ indra/newview/llpanelprofile.h | 2 ++ indra/newview/llviewerdisplayname.cpp | 8 ++++++++ 5 files changed, 38 insertions(+) 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("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(LLFloaterReg::findInstance("profile", LLSD().with("id", agent_id))); + if (profile_floater) + { + profile_floater->refreshName(); + } } }; From eab708daed3c5c0873c3fb96cd2d716e2ecb9ff1 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 10 Aug 2022 16:15:39 +0300 Subject: [PATCH 2/3] SL-17923 "Title" and "Description" labels are not displayed in "Picks" tab Fixed unlabeled fields in picks: For consistency purposes and for clarity both picks and classifieds should display title and descriprion labels. Fixed extra large spacing in classifieds --- .../xui/en/panel_profile_classified.xml | 8 +-- .../default/xui/en/panel_profile_pick.xml | 55 ++++++++++++++++++- 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_profile_classified.xml b/indra/newview/skins/default/xui/en/panel_profile_classified.xml index e6a94a368f..c9e8b242d4 100644 --- a/indra/newview/skins/default/xui/en/panel_profile_classified.xml +++ b/indra/newview/skins/default/xui/en/panel_profile_classified.xml @@ -119,10 +119,10 @@ tool_tip="Click to select an image" top="0" left="0" - height="197" - width="272" + height="161" + width="260" layout="topleft" - follows="left|top|right" + follows="left|top" image_name="spacer24.tga" visible="false" /> @@ -449,7 +449,7 @@ + + Title: + + + Description: + + + Location: + Date: Wed, 10 Aug 2022 17:24:26 +0300 Subject: [PATCH 3/3] SL-17924 Don't clear pick's description when clicking on description for the first time --- indra/newview/llpanelprofilepicks.cpp | 3 --- indra/newview/llpanelprofilepicks.h | 2 -- 2 files changed, 5 deletions(-) diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp index 8896c3d238..cf693f41b2 100644 --- a/indra/newview/llpanelprofilepicks.cpp +++ b/indra/newview/llpanelprofilepicks.cpp @@ -459,7 +459,6 @@ LLPanelProfilePick::LLPanelProfilePick() , mRequestedId(LLUUID::null) , mLocationChanged(false) , mNewPick(false) - , mCurrentPickDescription("") , mIsEditing(false) { } @@ -579,7 +578,6 @@ void LLPanelProfilePick::onDescriptionFocusReceived() { mIsEditing = true; mPickDescription->setParseHTML(false); - setPickDesc(mCurrentPickDescription); } } @@ -614,7 +612,6 @@ void LLPanelProfilePick::processProperties(const LLPickData* pick_info) setPickName(pick_info->name); setPickDesc(pick_info->desc); setPosGlobal(pick_info->pos_global); - mCurrentPickDescription = pick_info->desc; // Send remote parcel info request to get parcel name and sim (region) name. sendParcelInfoRequest(); diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h index 8973b37d16..f84463cc9b 100644 --- a/indra/newview/llpanelprofilepicks.h +++ b/indra/newview/llpanelprofilepicks.h @@ -242,8 +242,6 @@ protected: bool mNewPick; bool mIsEditing; - std::string mCurrentPickDescription; - void onDescriptionFocusReceived(); };