diff options
| author | Loren Shih <seraph@lindenlab.com> | 2009-11-19 13:36:27 -0500 |
|---|---|---|
| committer | Loren Shih <seraph@lindenlab.com> | 2009-11-19 13:36:27 -0500 |
| commit | afbc78d0398d58c44b2b1fb692ce1a27577fc4b1 (patch) | |
| tree | da4c6c1bd6e87b81b10a5b7bed6429373e6a89eb /indra/llui/lltextbase.cpp | |
| parent | 6cea252986ef6d33f2e37333a286362b8e0272c5 (diff) | |
| parent | 3e46ee6274d04d91657da92953b167fe94eb7f59 (diff) | |
Merging viewer-2-0 changes into avatar-pipeline branch
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/llui/lltextbase.cpp')
| -rw-r--r-- | indra/llui/lltextbase.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index caaf47240f..cd795282f9 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2380,6 +2380,14 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars); // if last character is a newline, then return true, forcing line break llwchar last_char = text[mStart + first_char + num_chars - 1]; + + LLUIImagePtr image = mStyle->getImage(); + if( image.notNull()) + { + width += image->getWidth(); + height = llmax(height, image->getHeight()); + } + return num_chars >= 1 && last_char == '\n'; } |
