summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelprofile.cpp')
-rw-r--r--indra/newview/llpanelprofile.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 6ea9cd2b92..ee94277ecc 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)
{
}
@@ -757,14 +758,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 +791,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 +1282,7 @@ void LLPanelProfileSecondLife::setLoaded()
{
mHideAgeCombo->setEnabled(true);
}
- mDescriptionEdit->setEnabled(true);
+ mDescriptionEdit->setEnabled(mAllowEdit);
}
}