diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-01-05 14:31:09 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-01-05 14:31:09 +0200 |
commit | 47dc1fc3437c9c266204604e85d8489b6e580584 (patch) | |
tree | df6b5e926ecda5205a5e6151e8149d261de1a744 /indra/llui/llconsole.cpp | |
parent | eb880b2a559fe1103bef47fa3f6c7611a6c3cfbb (diff) | |
parent | 5043fcce370fd21e9709f94787191a060919cc2b (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/llconsole.cpp')
-rw-r--r-- | indra/llui/llconsole.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index fa0abd55d0..c9090d388d 100644 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -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(); + } } |