diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-05-25 14:22:56 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-05-25 14:22:56 -0700 |
commit | 16e3d7ebf56731c5e9ff40b92eff427316c65103 (patch) | |
tree | 62552614f1314f4d3bb96ef133b9659bdae89e16 /indra/llui/lltextbase.cpp | |
parent | 1bd6061ff57a46293d962adf8ffa5326f87a3566 (diff) | |
parent | a91d10dc1806d1931c7f1361bfcf70df59d982d5 (diff) |
Merge
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r-- | indra/llui/lltextbase.cpp | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 78312eba73..9a07712757 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1582,11 +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; - link_params.color = match.getColor(); - link_params.readonly_color = match.getColor(); - link_params.font.style("UNDERLINE"); - link_params.link_href = match.getUrl(); + LLStyle::Params link_params(style_params); + link_params.overwriteFrom(match.getStyle()); // output the text before the Url if (start > 0) @@ -1624,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 |