summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2012-02-14 22:33:28 +0100
committerKitty Barnett <develop@catznip.com>2012-02-14 22:33:28 +0100
commit9c792e337695b904e4f52fce83b293a2e97fdeaf (patch)
treeb2bc60ca6fa618ea0620321c8250783c09d5a77d /indra/llui
parentc34b440fec36248ba63a5e85b47caa7271d31bec (diff)
STORM-276 FIXED Misspellings that span multiple lines don't have their squiggly lines drawn correctly
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lltextbase.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 2d7516a1cd..ce405cd4a4 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -678,9 +678,10 @@ void LLTextBase::drawText()
continue;
}
+ U32 misspell_start = llmax<U32>(misspell_it->first, seg_start), misspell_end = llmin<U32>(misspell_it->second, seg_end);
S32 squiggle_start = 0, squiggle_end = 0, pony = 0;
- cur_segment->getDimensions(seg_start - cur_segment->getStart(), misspell_it->first - seg_start, squiggle_start, pony);
- cur_segment->getDimensions(misspell_it->first - cur_segment->getStart(), misspell_it->second - misspell_it->first, squiggle_end, pony);
+ cur_segment->getDimensions(seg_start - cur_segment->getStart(), misspell_start - seg_start, squiggle_start, pony);
+ cur_segment->getDimensions(misspell_start - cur_segment->getStart(), misspell_end - misspell_start, squiggle_end, pony);
squiggle_start += text_rect.mLeft;
pony = (squiggle_end + 3) / 6;