diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-07-09 20:10:26 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-07-09 20:10:26 +0300 |
commit | 331ccee1f5cea9fab944c934b3beeb70fc7f6504 (patch) | |
tree | fe8937a1a02a71c3bcd9bfc3cec81aa7c3f9946d /indra | |
parent | 96631f6d4ef15f77775ef643091b4d62579dca3e (diff) |
EXT-8259 FIXED Fixed occasional truncation of the "More" link in expandable textboxes.
The bug seems to happen when the text contains trailing newlines.
So the workaround is to strip those newlines.
I use a workaround because a proper fix might require changing LLTextBase which is undesirable at this point.
Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/722/
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llexpandabletextbox.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 149ba2478d..92fda31cc2 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -140,7 +140,13 @@ void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,cons // LLTextBox::setText will obliterate the expander segment, so make sure // we generate it again by clearing mExpanderVisible mExpanderVisible = false; - LLTextEditor::setText(text, input_params); + + // Workaround for EXT-8259: trim text before rendering it. + { + std::string trimmed_text(text); + LLStringUtil::trim(trimmed_text); + LLTextEditor::setText(trimmed_text, input_params); + } // text contents have changed, segments are cleared out // so hide the expander and determine if we need it |