From 4ea7d2de9fcab4dd4694fcbbd2fece1c57f41d2c Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 24 May 2010 17:25:35 -0700 Subject: DEV-50271 FIX SLURL support for non-clickable display names reviewed by James --- indra/llui/lltextbase.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/llui/lltextbase.cpp') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 78312eba73..c93e6c7257 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1583,9 +1583,7 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c end = match.getEnd()+1; LLStyle::Params link_params = style_params; - link_params.color = match.getColor(); - link_params.readonly_color = match.getColor(); - link_params.font.style("UNDERLINE"); + link_params.overwriteFrom(match.getStyle()); link_params.link_href = match.getUrl(); // output the text before the Url -- cgit v1.2.3 From f682c996d28c3841b6709f8fc67ba443bfcd1926 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 24 May 2010 18:29:29 -0700 Subject: DEV-50271 FIX SLURL support for non-clickable display names --- indra/llui/lltextbase.cpp | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'indra/llui/lltextbase.cpp') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index c93e6c7257..9a07712757 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1582,9 +1582,8 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c start = match.getStart(); end = match.getEnd()+1; - LLStyle::Params link_params = style_params; + LLStyle::Params link_params(style_params); link_params.overwriteFrom(match.getStyle()); - link_params.link_href = match.getUrl(); // output the text before the Url if (start > 0) @@ -1622,26 +1621,20 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c } } - // output the styled Url (unless we've been asked to suppress hyperlinking) - if (match.isLinkDisabled()) - { - appendAndHighlightText(match.getLabel(), prepend_newline, part, style_params); - } - else - { - appendAndHighlightText(match.getLabel(), prepend_newline, part, link_params); + // output the styled Url + appendAndHighlightText(match.getLabel(), prepend_newline, part, link_params); - // set the tooltip for the Url label - if (! match.getTooltip().empty()) - { - segment_set_t::iterator it = getSegIterContaining(getLength()-1); - if (it != mSegments.end()) - { - LLTextSegmentPtr segment = *it; - segment->setToolTip(match.getTooltip()); - } - } + // set the tooltip for the Url label + if (! match.getTooltip().empty()) + { + segment_set_t::iterator it = getSegIterContaining(getLength()-1); + if (it != mSegments.end()) + { + LLTextSegmentPtr segment = *it; + segment->setToolTip(match.getTooltip()); + } } + prepend_newline = false; // move on to the rest of the text after the Url -- cgit v1.2.3