From 890da1d3914ffb52d0899c333fe8b8c280fe4d34 Mon Sep 17 00:00:00 2001
From: richard <none@none>
Date: Fri, 13 Nov 2009 16:50:17 -0800
Subject: fix for layout of urls with icons

---
 indra/llui/lltextbase.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'indra/llui')

diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 7b1aaac35c..313d37379b 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2377,6 +2377,14 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt
 	width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars);
 	// if last character is a newline, then return true, forcing line break
 	llwchar last_char = text[mStart + first_char + num_chars - 1];
+
+	LLUIImagePtr image = mStyle->getImage();
+	if( image.notNull())
+	{
+		width += image->getWidth();
+		height = llmax(height, image->getHeight());
+	}
+
 	return num_chars >= 1 && last_char == '\n';
 }
 
-- 
cgit v1.2.3