MAINT-3460 FIXED Dictionary doesn't exchange the mispelled word to correct one in a special case

Mnikolenko ProductEngine 2014-07-08 13:07:46 +03:00
parent bfa42c9e28
commit ae15e85e9f
1 changed files with 4 additions and 4 deletions

View File

@ -1308,14 +1308,14 @@ void LLTextBase::replaceWithSuggestion(U32 index)
if ( (it->first <= (U32)mCursorPos) && (it->second >= (U32)mCursorPos) )
{
deselect();
// Delete the misspelled word
removeStringNoUndo(it->first, it->second - it->first);
// Insert the suggestion in its place
LLWString suggestion = utf8str_to_wstring(mSuggestionList[index]);
insertStringNoUndo(it->first, utf8str_to_wstring(mSuggestionList[index]));
// Delete the misspelled word
removeStringNoUndo(it->first + (S32)suggestion.length(), it->second - it->first);
setCursorPos(it->first + (S32)suggestion.length());
break;