summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorEric M. Tulla (BigPapi) <tulla@lindenlab.com>2009-10-29 12:49:06 -0400
committerEric M. Tulla (BigPapi) <tulla@lindenlab.com>2009-10-29 12:49:06 -0400
commitfb4e95f7ea0a1f6e900f6ee1de73ec02860ff815 (patch)
tree96be2590ce94939aaae841c8a36429102f2afca9 /indra/llui/lltexteditor.cpp
parent1f0896c72a71797fcd924de1aab63ab5a5c893f9 (diff)
parent64c2cb6ba1c089c15df6c8ef5ec5313ed5f1897f (diff)
Merge after pull from viewer 2.0 changes
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 570ca4b998..f0238dba49 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2307,7 +2307,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 force_new_line, S32 hpad, S32 vpad)
+void LLTextEditor::appendWidget(const LLInlineViewSegment::Params& params, const std::string& text, bool allow_undo)
{
// Save old state
S32 selection_start = mSelectionStart;
@@ -2321,12 +2321,9 @@ void LLTextEditor::appendWidget(LLView* widget, const std::string &widget_text,
setCursorPos(old_length);
- LLWString widget_wide_text;
+ LLWString widget_wide_text = utf8str_to_wstring(text);
- // Add carriage return if not first line
- widget_wide_text = utf8str_to_wstring(widget_text);
-
- LLTextSegmentPtr segment = new LLInlineViewSegment(widget, old_length, old_length + widget_text.size(), force_new_line, hpad, vpad);
+ LLTextSegmentPtr segment = new LLInlineViewSegment(params, old_length, old_length + widget_wide_text.size());
insert(getLength(), widget_wide_text, FALSE, segment);
needsReflow();
@@ -2349,7 +2346,7 @@ void LLTextEditor::appendWidget(LLView* widget, const std::string &widget_text,
setCursorPos(cursor_pos);
}
- if( !allow_undo )
+ if (!allow_undo)
{
blockUndo();
}