From efa0d701845542e9ef555260fe6d2ad0beeb0760 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 11 Sep 2009 00:33:33 -0700 Subject: Backported clickable object names from 1.23 --- linden/indra/llui/lltexteditor.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'linden/indra/llui/lltexteditor.cpp') diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 95cce60..8fa253a 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -3605,13 +3605,13 @@ void LLTextEditor::appendColoredText(const std::string &new_text, style->setVisible(true); style->setColor(color); style->setFontName(font_name); - appendStyledText(new_text, allow_undo, prepend_newline, &style); + appendStyledText(new_text, allow_undo, prepend_newline, style); } void LLTextEditor::appendStyledText(const std::string &new_text, - bool allow_undo, + bool allow_undo, bool prepend_newline, - const LLStyleSP *stylep) + const LLStyleSP stylep) { if(mParseHTML) { @@ -3626,14 +3626,14 @@ void LLTextEditor::appendStyledText(const std::string &new_text, html->setColor(mLinkColor); if (stylep) { - html->setFontName((*stylep)->getFontString()); + html->setFontName(stylep->getFontString()); } html->mUnderline = TRUE; if (start > 0) appendText(text.substr(0,start),allow_undo, prepend_newline, stylep); html->setLinkHREF(text.substr(start,end-start)); - appendText(text.substr(start, end-start),allow_undo, prepend_newline, &html); - if (end < (S32)text.length()) + appendText(text.substr(start, end-start),allow_undo, prepend_newline, html); + if (end < (S32)text.length()) { text = text.substr(end,text.length() - end); end=0; @@ -3653,7 +3653,7 @@ void LLTextEditor::appendStyledText(const std::string &new_text, // Appends new text to end of document void LLTextEditor::appendText(const std::string &new_text, bool allow_undo, bool prepend_newline, - const LLStyleSP *stylep) + const LLStyleSP stylep) { // Save old state BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax()); @@ -3685,7 +3685,7 @@ void LLTextEditor::appendText(const std::string &new_text, bool allow_undo, bool { S32 segment_start = old_length; S32 segment_end = getLength(); - LLTextSegment* segment = new LLTextSegment(*stylep, segment_start, segment_end ); + LLTextSegment* segment = new LLTextSegment(stylep, segment_start, segment_end ); mSegments.push_back(segment); } -- cgit v1.1