diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-02-25 15:00:48 +0200 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-02-25 15:00:48 +0200 |
commit | fbf7217b49101faad3a4e910d8c88150c39e73d6 (patch) | |
tree | e796ccd1850fb2d579a9edda80edec25d1277eb1 /indra | |
parent | ed1945b06d49d2b4ebff5b9fe933675fdcf1e71f (diff) |
CHUI-790 FIXED Just disable "+" if selected participant is your own avatar
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelpeople.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 6667706333..c5283404f1 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -812,19 +812,20 @@ void LLPanelPeople::updateButtons() else { bool is_friend = true; - + bool is_self = false; // Check whether selected avatar is our friend. if (item_selected) { selected_id = selected_uuids.front(); is_friend = LLAvatarTracker::instance().getBuddyInfo(selected_id) != NULL; + is_self = gAgent.getID() == selected_id; } LLPanel* cur_panel = mTabContainer->getCurrentPanel(); if (cur_panel) { if (cur_panel->hasChild("add_friend_btn", TRUE)) - cur_panel->getChildView("add_friend_btn")->setEnabled(item_selected && !is_friend); + cur_panel->getChildView("add_friend_btn")->setEnabled(item_selected && !is_friend && !is_self); if (friends_tab_active) { |