diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-11-11 20:41:24 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-11-11 20:41:24 -0500 |
commit | 9b1680927f474992d0f2f4313c7d7b9f730862f4 (patch) | |
tree | a25a78684655a14188b5c18f59ad70154de22e0f /indra/llui/lltextbase.cpp | |
parent | bcdd3c25b6bcfaac7849e9aad6fd6c9bb2da1e82 (diff) | |
parent | 7eb8bb4ad18c313c178bb7977adee8e0044b14b7 (diff) |
merge
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r-- | indra/llui/lltextbase.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 8d36c9c616..9706878a57 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -994,6 +994,12 @@ void LLTextBase::setColor( const LLColor4& c ) mFgColor = c; } +//virtual +void LLTextBase::setReadOnlyColor(const LLColor4 &c) +{ + mReadOnlyFgColor = c; +} + //virtual void LLTextBase::setValue(const LLSD& value ) { @@ -2369,7 +2375,9 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt height = mFontHeight; width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars); - return num_chars >= 1 && text[mStart + num_chars - 1] == '\n'; + // if last character is a newline, then return true, forcing line break + llwchar last_char = text[mStart + first_char + num_chars - 1]; + return num_chars >= 1 && last_char == '\n'; } S32 LLNormalTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const |