diff options
| author | James Cook <james@lindenlab.com> | 2009-11-18 09:12:54 -0800 |
|---|---|---|
| committer | James Cook <james@lindenlab.com> | 2009-11-18 09:12:54 -0800 |
| commit | 1a2694f92b8dc27e8eb1b53b83e3b5201754f589 (patch) | |
| tree | 9101c2fe4aa02a52ccfb44bc9e68b1d27051e65e /indra/llui/lltextbase.cpp | |
| parent | 22aa5eed910bbd1b366789cb96247899c744df75 (diff) | |
| parent | acc53aa2f7a3fd939a207674a3bdf96d6e649f90 (diff) | |
merge
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'; } |
