summaryrefslogtreecommitdiff
path: root/indra/llui/llconsole.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-01-05 12:37:26 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2010-01-05 12:37:26 +0200
commitddf2cccdb926ca2aac226a90c4030f2d4e8c6f50 (patch)
treea1d7fe2f014b70e5b0d5fe3419b4e5eb85c0de48 /indra/llui/llconsole.cpp
parent3c5976981dd06ccca45d9d2b9024a6c72fd7ea49 (diff)
parentb282f04b31f60a3ddd9dcbd27eed2d2226a40e09 (diff)
Merge from default branch.
--HG-- branch : product-engine
Diffstat (limited to 'indra/llui/llconsole.cpp')
-rw-r--r--indra/llui/llconsole.cpp6
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();
+ }
}