summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2009-10-29 18:07:46 +0800
committerangela <angela@lindenlab.com>2009-10-29 18:07:46 +0800
commit53d48741b8b595665d3f9a7f717bd9f8fa3f7601 (patch)
tree7abafe6164e10a5295514e69c8f26ad8bc40f62c /indra/llui/lltexteditor.cpp
parent07749af3871420b9f4542e288da4372cdf2d2513 (diff)
parent64c2cb6ba1c089c15df6c8ef5ec5313ed5f1897f (diff)
merge
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();
}