diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-20 19:24:07 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-20 19:24:07 +0200 |
commit | d0c1593d85cd26ad822d31e21df7a1864d66541c (patch) | |
tree | 30ceb3cfc19ccb36b7bcc7f0e5a2ad3efdd38747 /indra/llui/lltextbase.cpp | |
parent | 9d64bf132e27739dedeca17a1d952655c6b52ac3 (diff) | |
parent | 0c468557b9e38ec4be201fa991499ed095a4d8c3 (diff) |
Merge
--HG--
branch : product-engine
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'; } |