diff options
author | richard <none@none> | 2009-12-17 10:03:56 -0800 |
---|---|---|
committer | richard <none@none> | 2009-12-17 10:03:56 -0800 |
commit | 724f5fbb7f7b101774c0cf3ff43bb98f9cc4ffc1 (patch) | |
tree | bfb7b4009b32761f9f760f97dd97cc0697667a71 /indra/llui/lltextbase.cpp | |
parent | 9ff869a6b287a2b4b8c94219584d1c7b66ebb399 (diff) | |
parent | cf63ce4dc1176d9df4fe852821e4a6d32332f7c6 (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 1f120a1483..6c983fd92e 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1138,6 +1138,8 @@ void LLTextBase::reflow(S32 start_index) line_height = llmax(line_height, segment_height); remaining_pixels -= segment_width; + // getNumChars() and getDimensions() should return consistent results + llassert_always(remaining_pixels >= 0); seg_offset += character_count; S32 last_segment_char_on_line = segment->getStart() + seg_offset; @@ -2464,6 +2466,12 @@ S32 LLNormalTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin { LLWString text = mEditor.getWText(); + LLUIImagePtr image = mStyle->getImage(); + if( image.notNull()) + { + num_pixels -= image->getWidth(); + } + // search for newline and if found, truncate there S32 last_char = mStart + segment_offset; for (; last_char != mEnd; ++last_char) |