summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelavatar.cpp')
-rw-r--r--indra/newview/llpanelavatar.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp
index 7670a5120c..6413d939f0 100644
--- a/indra/newview/llpanelavatar.cpp
+++ b/indra/newview/llpanelavatar.cpp
@@ -336,10 +336,10 @@ BOOL LLPanelAvatarProfile::postBuild()
childSetCommitCallback("share",(boost::bind(&LLPanelAvatarProfile::onShareButtonClick,this)),NULL);
LLTextureCtrl* pic = getChild<LLTextureCtrl>("2nd_life_pic");
- pic->setFallbackImageName("default_land_picture.j2c");
+ pic->setFallbackImageName("default_profile_picture.j2c");
pic = getChild<LLTextureCtrl>("real_world_pic");
- pic->setFallbackImageName("default_land_picture.j2c");
+ pic->setFallbackImageName("default_profile_picture.j2c");
resetControls();
resetData();
@@ -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)