summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorprep@lindenlab.com <prep@lindenlab.com>2013-03-29 10:37:58 -0500
committerprep@lindenlab.com <prep@lindenlab.com>2013-03-29 10:37:58 -0500
commit0f24668b0a834e37a3a8767abc7b0ee51bf23fcd (patch)
tree4ae685f79c3964e1ac7246641fa9d957b25b5ee1 /indra/newview/llvoavatar.cpp
parent8e6d2f8ddc3fe8a1eee3abe99eb5abd3575c5841 (diff)
parenta62a824efb89aff3056d0659ee2c23ad6d15eeaa (diff)
Merged in Chui beta6+ fixes
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 d492524789..6329d53913 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();
}