[BUG-3527] Replacing a misspelling surrounded by line break segments results in only line breaks being inserted

master
Kitty Barnett 2013-08-12 19:34:42 +02:00
parent e9125ac77c
commit 1ba7d93a6a
1 changed files with 5 additions and 1 deletions

View File

@ -1352,7 +1352,11 @@ void LLTextBase::replaceWithSuggestion(U32 index)
// Insert the suggestion in its place
LLWString suggestion = utf8str_to_wstring(mSuggestionList[index]);
insertStringNoUndo(it->first, utf8str_to_wstring(mSuggestionList[index]));
LLStyleConstSP sp(new LLStyle(getStyleParams()));
LLTextSegmentPtr segmentp = new LLNormalTextSegment(sp, it->first, it->first + suggestion.size(), *this);
segment_vec_t segments(1, segmentp);
insertStringNoUndo(it->first, suggestion, &segments);
setCursorPos(it->first + (S32)suggestion.length());
break;