summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelimcontrolpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelimcontrolpanel.cpp')
-rw-r--r--indra/newview/llpanelimcontrolpanel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp
index 51cdc5af93..a7590ac1dd 100644
--- a/indra/newview/llpanelimcontrolpanel.cpp
+++ b/indra/newview/llpanelimcontrolpanel.cpp
@@ -82,6 +82,9 @@ void LLPanelIMControlPanel::onShareButtonClicked()
void LLPanelIMControlPanel::setID(const LLUUID& avatar_id)
{
+ // Disable "Add friend" button for friends.
+ childSetEnabled("add_friend_btn", !LLAvatarActions::isFriend(avatar_id));
+
getChild<LLAvatarIconCtrl>("avatar_icon")->setValue(avatar_id);
}