diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2025-11-07 17:22:27 +0200 |
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2025-11-07 17:23:55 +0200 |
| commit | 74a64d206d8068a1f14c8df30407dbf4a596d7e8 (patch) | |
| tree | b960226dee8ea64c3dde20178d57e6ee368a72b2 /indra/newview/llpanelprofile.cpp | |
| parent | c39135cd848305c3acfcbd6dd2fc817cd09951de (diff) | |
| parent | c8d08ee388ff8c968802412db134136c529e5bca (diff) | |
Merge branch 'develop' into maxim/voice-moderation
Diffstat (limited to 'indra/newview/llpanelprofile.cpp')
| -rw-r--r-- | indra/newview/llpanelprofile.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 6ea9cd2b92..be10cace9c 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -693,6 +693,7 @@ LLPanelProfileSecondLife::LLPanelProfileSecondLife() , mWaitingForImageUpload(false) , mAllowPublish(false) , mHideAge(false) + , mAllowEdit(true) { } @@ -709,6 +710,10 @@ LLPanelProfileSecondLife::~LLPanelProfileSecondLife() { mAvatarNameCacheConnection.disconnect(); } + if (mMenuNameCacheConnection.connected()) + { + mMenuNameCacheConnection.disconnect(); + } } bool LLPanelProfileSecondLife::postBuild() @@ -757,14 +762,15 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key) LLUUID avatar_id = getAvatarId(); bool own_profile = getSelfProfile(); + bool allow_edit = own_profile && mAllowEdit; mGroupList->setShowNone(!own_profile); - childSetVisible("notes_panel", !own_profile); - childSetVisible("settings_panel", own_profile); - childSetVisible("about_buttons_panel", own_profile); + childSetVisible("notes_panel", !allow_edit); + childSetVisible("settings_panel", allow_edit); + childSetVisible("about_buttons_panel", allow_edit); - if (own_profile) + if (allow_edit) { // Group list control cannot toggle ForAgent loading // Less than ideal, but viewing own profile via search is edge case @@ -789,7 +795,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key) mAgentActionMenuButton->setMenu("menu_profile_other.xml", LLMenuButton::MP_BOTTOM_RIGHT); } - mDescriptionEdit->setParseHTML(!own_profile); + mDescriptionEdit->setParseHTML(!allow_edit); if (!own_profile) { @@ -1280,7 +1286,7 @@ void LLPanelProfileSecondLife::setLoaded() { mHideAgeCombo->setEnabled(true); } - mDescriptionEdit->setEnabled(true); + mDescriptionEdit->setEnabled(mAllowEdit); } } @@ -1456,7 +1462,7 @@ void LLPanelProfileSecondLife::onCommitMenu(const LLSD& userdata) } else if (item_name == "edit_display_name") { - LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCacheSetName, this, _1, _2)); + mMenuNameCacheConnection = LLAvatarNameCache::get(getAvatarId(), boost::bind(&LLPanelProfileSecondLife::onAvatarNameCacheSetName, this, _1, _2)); LLFirstUse::setDisplayName(false); } else if (item_name == "edit_partner") |
