diff options
| author | richard <none@none> | 2010-01-15 13:16:58 -0800 | 
|---|---|---|
| committer | richard <none@none> | 2010-01-15 13:16:58 -0800 | 
| commit | cf2beaeea6d4ccd8a0a0448660ddd120aeed5823 (patch) | |
| tree | 98c959672debae3fc86e2afe7d924d8d15253317 /indra/llui | |
| parent | c9cf84913d306103da51dc83e5932ff3fb308d32 (diff) | |
EXT-4380 - LLTextEditor: line_spacing.multiple option doesn't work well with "widgeted" text
partial fix
reviewed by Leyla
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/lltextbase.cpp | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 5ebf49c488..17aecaf32f 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -346,7 +346,8 @@ void LLTextBase::drawSelectionBackground()  					S32 segment_line_start = segmentp->getStart() + segment_offset;  					S32 segment_line_end = llmin(segmentp->getEnd(), line_iter->mDocIndexEnd); -					S32 segment_width, segment_height; +					S32 segment_width = 0; +					S32 segment_height = 0;  					// if selection after beginning of segment  					if(selection_left >= segment_line_start) @@ -433,7 +434,8 @@ void LLTextBase::drawCursor()  			if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode() && !hasSelection())  			{ -				S32 segment_width, segment_height; +				S32 segment_width = 0; +				S32 segment_height = 0;  				segmentp->getDimensions(mCursorPos - segmentp->getStart(), 1, segment_width, segment_height);  				S32 width = llmax(CURSOR_THICKNESS, segment_width);  				cursor_rect.mRight = cursor_rect.mLeft + width; @@ -2443,10 +2445,12 @@ void LLNormalTextSegment::setToolTip(const std::string& tooltip)  bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const  { -	height = mFontHeight; +	height = 0; +	width = 0;  	bool force_newline = false;  	if (num_chars > 0)  	{ +		height = mFontHeight;  		LLWString text = mEditor.getWText();  		// if last character is a newline, then return true, forcing line break  		llwchar last_char = text[mStart + first_char + num_chars - 1]; @@ -2461,10 +2465,6 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt  			width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars);  		}  	} -	else -	{ -		width = 0; -	}  	LLUIImagePtr image = mStyle->getImage();  	if( image.notNull()) | 
