summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorNyx Linden <nyx@lindenlab.com>2013-03-29 18:06:05 -0400
committerNyx Linden <nyx@lindenlab.com>2013-03-29 18:06:05 -0400
commitadc4f8d02e1184b3072a4ff511594d31c3cd68e0 (patch)
tree24ca324105772f18b70135f7d68bcc88cc993b83 /indra/newview/llvoavatar.cpp
parent8e7c04f1d0ef6a7be800a7f3539f301aaededd14 (diff)
parentab272c20a914c4816cee55db7a4bdd0217580630 (diff)
merge
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index ea0a30d580..0ec6ef3d14 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -680,7 +680,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mBelowWater(FALSE),
mLastAppearanceBlendTime(0.f),
mAppearanceAnimating(FALSE),
- mNameString(),
+ mNameIsSet(false),
mTitle(),
mNameAway(false),
mNameDoNotDisturb(false),
@@ -2637,8 +2637,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
}
// Rebuild name tag if state change detected
- if (mNameString.empty()
- || (mNameString.size() == 2 && mNameString[0] == 10 && mNameString[1] == 10) // *TODO : find out why mNameString is sometimes ""
+ if (!mNameIsSet
|| new_name
|| (!title && !mTitle.empty())
|| (title && mTitle != title->getString())
@@ -2831,17 +2830,16 @@ void LLVOAvatar::addNameTagLine(const std::string& line, const LLColor4& color,
{
mNameText->addLine(line, color, (LLFontGL::StyleFlags)style, font);
}
- mNameString += line;
- mNameString += '\n';
+ mNameIsSet |= !line.empty();
}
void LLVOAvatar::clearNameTag()
{
- mNameString.clear();
+ mNameIsSet = false;
if (mNameText)
{
mNameText->setLabel("");
- mNameText->setString( "" );
+ mNameText->setString("");
}
mTimeVisible.reset();
}