summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-11-24 08:47:13 -0800
committerJames Cook <james@lindenlab.com>2009-11-24 08:47:13 -0800
commitf9081220accfe5c197f1c567af8806bde236f946 (patch)
treee711a74a34aa309222d28f694f02345dde305c4d /indra/llui/lltextbase.cpp
parent76be5ddc7022508e7d3fcb04165b4a6f64f1d58d (diff)
parent0b3f6b3e9a1414c11ccf6011930c2eec6cf2fdd7 (diff)
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--indra/llui/lltextbase.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index e210667764..3619b36c0d 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -60,6 +60,11 @@ LLTextBase::line_info::line_info(S32 index_start, S32 index_end, LLRect rect, S3
bool LLTextBase::compare_segment_end::operator()(const LLTextSegmentPtr& a, const LLTextSegmentPtr& b) const
{
+ // sort empty spans (e.g. 11-11) after previous non-empty spans (e.g. 5-11)
+ if (a->getEnd() == b->getEnd())
+ {
+ return a->getStart() < b->getStart();
+ }
return a->getEnd() < b->getEnd();
}