Commits

callum  committed 4644507

SOCIAL-423 FIX Display name and username are wrong in My Profile tab

  • Participants
  • Parent commits 28f47e5

Comments (0)

Files changed (2)

File indra/newview/llpanelavatar.cpp

 void LLPanelAvatarProfile::got_full_name_callback( const LLUUID& id, const std::string& full_name, bool is_group )
 {
 	LLStringUtil::format_map_t args;
-	args["[NAME]"] = full_name;
+
+	std::string name;
+	if (LLAvatarNameCache::useDisplayNames())
+	{
+		name = LLCacheName::buildUsername(full_name);
+	}
+	else
+	{
+		name = full_name;
+	}
+
+	args["[NAME]"] = name;
 
 	std::string linden_name = getString("name_text_args", args);
 	getChild<LLUICtrl>("name_descr_text")->setValue(linden_name);

File indra/newview/skins/default/xui/en/panel_my_profile.xml

                 height="15"
                 layout="topleft"
                 left_pad="10"
-                name="name_descr_text"
+                name="display_name_descr_text"
                 text_color="0.7 0.7 0.7 1.0"
                 top_delta="0"
                 width="280" >
                 height="15"
                 layout="topleft"
                 left_delta="0"
-                name="display_name_descr_text"
+                name="name_descr_text"
                 text_color="0.4 0.4 0.4 1.0"
                 top_delta="20"
                 width="280">