diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 0cafd4b..963eede 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -527,17 +527,20 @@ std::vector<S32> LLTextEditor::getMisspelledWordsPositions() | |||
527 | { | 527 | { |
528 | wordEnd++; | 528 | wordEnd++; |
529 | } | 529 | } |
530 | //got a word :D | ||
531 | |||
532 | std::string regText(text.begin(),text.end()); | ||
533 | std::string selectedWord(regText.substr(wordStart,wordEnd-wordStart)); | ||
534 | 530 | ||
535 | if(!glggHunSpell->isSpelledRight(selectedWord)) | 531 | //got a word? -- MC |
536 | { | 532 | if (wordStart != wordEnd) |
537 | //misspelled word here, and you have just right clicked on it | 533 | { |
534 | std::string regText(text.begin(),text.end()); | ||
535 | std::string selectedWord(regText.substr(wordStart,wordEnd-wordStart)); | ||
536 | |||
537 | if(!selectedWord.empty() && !glggHunSpell->isSpelledRight(selectedWord)) | ||
538 | { | ||
539 | //misspelled word here, and you have just right clicked on it | ||
538 | 540 | ||
539 | thePosesOfBadWords.push_back(wordStart); | 541 | thePosesOfBadWords.push_back(wordStart); |
540 | thePosesOfBadWords.push_back(wordEnd); | 542 | thePosesOfBadWords.push_back(wordEnd); |
543 | } | ||
541 | } | 544 | } |
542 | } | 545 | } |
543 | wordEnd++; | 546 | wordEnd++; |
@@ -3281,7 +3284,7 @@ void LLTextEditor::drawMisspelled() | |||
3281 | } | 3284 | } |
3282 | } | 3285 | } |
3283 | //draw | 3286 | //draw |
3284 | if (glggHunSpell->getSpellCheckHighlight()) | 3287 | if (!misspellLocations.empty() && glggHunSpell->getSpellCheckHighlight()) |
3285 | { | 3288 | { |
3286 | for (int i = 0; i<(int)misspellLocations.size() ;i++) | 3289 | for (int i = 0; i<(int)misspellLocations.size() ;i++) |
3287 | { | 3290 | { |