summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelavatar.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-10-23 17:20:45 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-10-23 17:20:45 +0000
commitb43771cad585cb9820941eb1b24b67390eaa9435 (patch)
tree322e5f94a1fa473ad4e8c0b343974a72e824f66a /indra/newview/llpanelavatar.cpp
parent0220106ecdecd323854522a5bc3fd6455c60fdfc (diff)
Merging revisions 2156-2183 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0-3, respecting ancestry
* Bugs: EXT-1590 EXT-1694 EXT-1660 EXT-1646 EXT-1694 EXT-1316 EXT-1775 EXT-1798 EXT-1799 EXT-1117 EXT-1571 EXT-1572 * Dev: EXT-1757 EXT-991 EXT-1758 EXT-1770 EXT-1192 EXT-1613 EXT-1611 EXT-1256 EXT-1758 EXT-747
Diffstat (limited to 'indra/newview/llpanelavatar.cpp')
-rw-r--r--indra/newview/llpanelavatar.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 1a2ef8e1bb..6413d939f0 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -351,6 +351,8 @@ void LLPanelAvatarProfile::onOpen(const LLSD& key)
{
LLPanelProfileTab::onOpen(key);
+ mGroups.erase();
+
//Disable "Add Friend" button for friends.
childSetEnabled("add_friend", !LLAvatarActions::isFriend(getAvatarId()));
}
@@ -381,6 +383,7 @@ void LLPanelAvatarProfile::resetControls()
void LLPanelAvatarProfile::resetData()
{
+ mGroups.erase();
childSetValue("2nd_life_pic",LLUUID::null);
childSetValue("real_world_pic",LLUUID::null);
childSetValue("online_status",LLStringUtil::null);
@@ -428,11 +431,15 @@ void LLPanelAvatarProfile::processProfileProperties(const LLAvatarData* avatar_d
void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_groups)
{
- std::string groups;
+ // *NOTE dzaporozhan
+ // Group properties may arrive in two callbacks, we need to save them across
+ // different calls. We can't do that in textbox as textbox may change the text.
+
+ std::string groups = mGroups;
LLAvatarGroups::group_list_t::const_iterator it = avatar_groups->group_list.begin();
const LLAvatarGroups::group_list_t::const_iterator it_end = avatar_groups->group_list.end();
- if(it_end != it)
+ if(groups.empty() && it_end != it)
{
groups = (*it).group_name;
++it;
@@ -443,7 +450,8 @@ void LLPanelAvatarProfile::processGroupProperties(const LLAvatarGroups* avatar_g
groups += ", ";
groups += group_data.group_name;
}
- childSetValue("sl_groups",groups);
+ mGroups = groups;
+ childSetValue("sl_groups",mGroups);
}
void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data)