diff options
author | richard <none@none> | 2010-01-06 12:23:56 -0800 |
---|---|---|
committer | richard <none@none> | 2010-01-06 12:23:56 -0800 |
commit | 49660730308fb6d5301d1617402a353a21e9d9be (patch) | |
tree | 90887ce7d989a2ceb6a5e5f23aa9b2a123ab5abb /indra/newview/llhudtext.cpp | |
parent | 3b7080a6b112c492a9025ae1a350db0ab4e88e50 (diff) |
moved clipping logic inside LLFontGL::maxDrawableChars controlled by EWordWrapStyle
fixes regression introduced in 3eef5ce9ae1e6fc62b9b52ce859501dd4e70fadf
reviewed by Brad
Diffstat (limited to 'indra/newview/llhudtext.cpp')
-rw-r--r-- | indra/newview/llhudtext.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index b95e5f53e8..08cf86df4a 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -606,12 +606,7 @@ void LLHUDText::addLine(const LLWString &wstr, const LLColor4& color, const LLFo U32 line_length = 0; do { - S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wline.length(), TRUE); - if (segment_length == 0) - { - // try again without wrapping on word boundaries - segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wline.length(), FALSE); - } + S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wline.length(), LLFontGL::WORD_BOUNDARY_IF_POSSIBLE); mTextSegments.push_back(LLHUDTextSegment(iter->substr(line_length, segment_length), style, color)); line_length += segment_length; } @@ -647,12 +642,7 @@ void LLHUDText::setLabel(const LLWString &wlabel) U32 line_length = 0; do { - S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wstr.length(), TRUE); - if (segment_length == 0) - { - // try again without wrapping on word boundaries - segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wstr.length(), FALSE); - } + S32 segment_length = mFontp->maxDrawableChars(iter->substr(line_length).c_str(), mUseBubble ? HUD_TEXT_MAX_WIDTH : HUD_TEXT_MAX_WIDTH_NO_BUBBLE, wstr.length(), LLFontGL::WORD_BOUNDARY_IF_POSSIBLE); mLabelSegments.push_back(LLHUDTextSegment(iter->substr(line_length, segment_length), LLFontGL::NORMAL, mColor)); line_length += segment_length; } |