diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-12 20:01:16 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-12 20:01:16 +0200 |
commit | a321c51edac7ee75a5b65a1954424e789d1f3b1c (patch) | |
tree | d0742fb10f6ea53a11cf3228bad0092390e31059 /indra/llui/lltextbase.cpp | |
parent | 3e75fe4db1aa3659dfc34598ece090d845ac6c5a (diff) | |
parent | f5c431aa7bce953503b33c957ba024bdd9104e63 (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r-- | indra/llui/lltextbase.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 851fb966ec..d514c0b389 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -246,7 +246,7 @@ LLTextBase::~LLTextBase() { // Menu, like any other LLUICtrl, is deleted by its parent - gMenuHolder - clearSegments(); + mSegments.clear(); } void LLTextBase::initFromParams(const LLTextBase::Params& p) @@ -396,8 +396,13 @@ void LLTextBase::drawSelectionBackground() ++rect_it) { LLRect selection_rect = *rect_it; - selection_rect.translate(mVisibleTextRect.mLeft - content_display_rect.mLeft, mVisibleTextRect.mBottom - content_display_rect.mBottom); - gl_rect_2d(selection_rect, selection_color); + // Don't send empty rects to gl_rect_2d. + // Drawing degenerate rectangles seems to cause https://jira.secondlife.com/browse/EXT-6276 . + if(selection_rect.notEmpty()) + { + selection_rect.translate(mVisibleTextRect.mLeft - content_display_rect.mLeft, mVisibleTextRect.mBottom - content_display_rect.mBottom); + gl_rect_2d(selection_rect, selection_color); + } } } } |