summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-05-25 14:22:56 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-05-25 14:22:56 -0700
commit16e3d7ebf56731c5e9ff40b92eff427316c65103 (patch)
tree62552614f1314f4d3bb96ef133b9659bdae89e16 /indra/llui/lltextbase.cpp
parent1bd6061ff57a46293d962adf8ffa5326f87a3566 (diff)
parenta91d10dc1806d1931c7f1361bfcf70df59d982d5 (diff)
Merge
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--indra/llui/lltextbase.cpp37
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