summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llrender/llfontgl.cpp2
-rw-r--r--indra/llui/lltextbase.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp
index 6a7eba2712..2240a2146c 100644
--- a/indra/llrender/llfontgl.cpp
+++ b/indra/llrender/llfontgl.cpp
@@ -369,7 +369,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
if (right_x)
{
- *right_x = cur_x / sScaleX;
+ *right_x = (cur_x - origin.mV[VX]) / sScaleX;
}
//FIXME: add underline as glyph?
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index a580345b6c..4bcf7e6980 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1029,8 +1029,10 @@ void LLTextBase::draw()
LLUICtrl::draw();
{
- // only clip if we support scrolling or have word wrap turned off
- LLLocalClipRect clip(doc_rect, !getWordWrap() || mScroller != NULL);
+ // only clip if we support scrolling...
+ // since convention is that text boxes never vertically truncate their contents
+ // regardless of rect bounds
+ LLLocalClipRect clip(doc_rect, mScroller != NULL);
drawSelectionBackground();
drawText();
drawCursor();