diff options
| author | Leyla Farazha <leyla@lindenlab.com> | 2010-01-06 16:38:19 -0800 |
|---|---|---|
| committer | Leyla Farazha <leyla@lindenlab.com> | 2010-01-06 16:38:19 -0800 |
| commit | 35bb14951f686da538264db349f4bfbe045b8c82 (patch) | |
| tree | 31d37e3e67863aba03b2c6aef5abc5629a784e65 /indra/llui/llconsole.cpp | |
| parent | 95f14d73138a4f0eb9163fdc560a0dcad9564c4c (diff) | |
| parent | e28eac929b8d26d133be5c1953cfdd0b7d0eb9e5 (diff) | |
Merge
Diffstat (limited to 'indra/llui/llconsole.cpp')
| -rw-r--r-- | indra/llui/llconsole.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index fa0abd55d0..e08d93b232 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -330,7 +330,7 @@ void LLConsole::Paragraph::updateLines(F32 screen_width, const LLFontGL* font, b skip_chars = 0; } - U32 drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_end - paragraph_offset, TRUE); + U32 drawable = font->maxDrawableChars(mParagraphText.c_str()+paragraph_offset, screen_width, line_end - paragraph_offset, LLFontGL::WORD_BOUNDARY_IF_POSSIBLE); if (drawable != 0) { @@ -392,4 +392,10 @@ void LLConsole::addLine(const LLWString& wline, F32 size, const LLColor4 &color) Paragraph paragraph(wline, color, mTimer.getElapsedTimeF32(), mFont, (F32)getRect().getWidth() ); mParagraphs.push_back ( paragraph ); + + // remove old paragraphs which can't possibly be visible any more. ::draw() will do something similar but more conservative - we do this here because ::draw() isn't guaranteed to ever be called! (i.e. the console isn't visible) + while ((S32)mParagraphs.size() > llmax((S32)0, (S32)(mMaxLines))) + { + mParagraphs.pop_front(); + } } |
