diff options
| author | Richard Nelson <richard@lindenlab.com> | 2009-10-20 00:41:41 +0000 |
|---|---|---|
| committer | Richard Nelson <richard@lindenlab.com> | 2009-10-20 00:41:41 +0000 |
| commit | ce5a5f84d5b5aee95b0b130d0fbdb8fbaa688ba7 (patch) | |
| tree | b710655439feee3af795dd3311edd4bbf93d5568 /indra/llui/lltexteditor.cpp | |
| parent | b36eee458126f191022c4483d3a496cbbf7dc30c (diff) | |
ext-1670 - fix the chat history use of widgets
reviewed by leyla
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
| -rw-r--r-- | indra/llui/lltexteditor.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 7c925b8899..953c5b292f 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2276,7 +2276,7 @@ void LLTextEditor::insertText(const std::string &new_text) setEnabled( enabled ); } -void LLTextEditor::appendWidget(LLView* widget, const std::string &widget_text, bool allow_undo, bool prepend_newline) +void LLTextEditor::appendWidget(LLView* widget, const std::string &widget_text, bool allow_undo, bool force_new_line) { // Save old state S32 selection_start = mSelectionStart; @@ -2293,17 +2293,9 @@ void LLTextEditor::appendWidget(LLView* widget, const std::string &widget_text, LLWString widget_wide_text; // Add carriage return if not first line - if (getLength() != 0 - && prepend_newline) - { - widget_wide_text = utf8str_to_wstring(std::string("\n") + widget_text); - } - else - { - widget_wide_text = utf8str_to_wstring(widget_text); - } + widget_wide_text = utf8str_to_wstring(widget_text); - LLTextSegmentPtr segment = new LLInlineViewSegment(widget, old_length, old_length + widget_text.size()); + LLTextSegmentPtr segment = new LLInlineViewSegment(widget, old_length, old_length + widget_text.size(), force_new_line); insert(getLength(), widget_wide_text, FALSE, segment); needsReflow(); |
