diff options
author | Oz Linden <oz@lindenlab.com> | 2011-03-10 13:40:36 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-03-10 13:40:36 -0500 |
commit | 57c5d474013793f622ac77a139251a54b056cb00 (patch) | |
tree | 8cd490d3bb86e74bfcd701ee400bccda74791629 /indra/llcommon/llavatarname.cpp | |
parent | d3ca4983a4526c7fcf9eb9609e007ded74c47c05 (diff) | |
parent | 0c02401498521f87d38778df0e795960aa5445e1 (diff) |
pull 2.5.1 tag back from viewer-release
Diffstat (limited to 'indra/llcommon/llavatarname.cpp')
-rw-r--r-- | indra/llcommon/llavatarname.cpp | 10 |
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; } |