summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-05-24 18:29:29 -0700
committerRichard Nelson <none@none>2010-05-24 18:29:29 -0700
commitf682c996d28c3841b6709f8fc67ba443bfcd1926 (patch)
tree2be85feed4fe3cd32204f19504626420ad9dd556 /indra/llui/lltextbase.cpp
parent4ea7d2de9fcab4dd4694fcbbd2fece1c57f41d2c (diff)
DEV-50271 FIX SLURL support for non-clickable display names
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--indra/llui/lltextbase.cpp33
1 files changed, 13 insertions, 20 deletions
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