summaryrefslogtreecommitdiff
path: root/indra/llcommon/llavatarname.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-03-10 13:40:36 -0500
committerOz Linden <oz@lindenlab.com>2011-03-10 13:40:36 -0500
commit57c5d474013793f622ac77a139251a54b056cb00 (patch)
tree8cd490d3bb86e74bfcd701ee400bccda74791629 /indra/llcommon/llavatarname.cpp
parentd3ca4983a4526c7fcf9eb9609e007ded74c47c05 (diff)
parent0c02401498521f87d38778df0e795960aa5445e1 (diff)
pull 2.5.1 tag back from viewer-release
Diffstat (limited to 'indra/llcommon/llavatarname.cpp')
-rw-r--r--indra/llcommon/llavatarname.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/llcommon/llavatarname.cpp b/indra/llcommon/llavatarname.cpp
index ad1845d387..ba3dd6d6b4 100644
--- a/indra/llcommon/llavatarname.cpp
+++ b/indra/llcommon/llavatarname.cpp
@@ -90,14 +90,16 @@ void LLAvatarName::fromLLSD(const LLSD& sd)
std::string LLAvatarName::getCompleteName() const
{
std::string name;
- if (!mUsername.empty())
+ if (mUsername.empty() || mIsDisplayNameDefault)
+ // If the display name feature is off
+ // OR this particular display name is defaulted (i.e. based on user name),
+ // then display only the easier to read instance of the person's name.
{
- name = mDisplayName + " (" + mUsername + ")";
+ name = mDisplayName;
}
else
{
- // ...display names are off, legacy name is in mDisplayName
- name = mDisplayName;
+ name = mDisplayName + " (" + mUsername + ")";
}
return name;
}