summaryrefslogtreecommitdiff
path: root/indra/llcommon/llavatarname.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2011-03-10 12:11:22 -0800
committerLeyla Farazha <leyla@lindenlab.com>2011-03-10 12:11:22 -0800
commit378585e7f089b62b7a0dd69adde48cd63fc7bacc (patch)
treec9f231718b68483a791beb1fb82c90820cd8dc5c /indra/llcommon/llavatarname.cpp
parentbb57d34cb1db372322f196ba3fd9190a352a71e3 (diff)
parente94fa316f34c275d3059808903ea5d8cf24a1ad3 (diff)
Merge
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;
}