From b93474301489d2192cc9b7c8a675b55f49c9577b Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Mon, 9 Aug 2010 15:14:45 +0300 Subject: EXT-8010 ADDITIONAL FIX Fixed problems with avatar links underlining. There were two problems: 1. Underlining broke when avatar's first and second name were on different lines. 2. There was no underline on hover for avatar miniinspector links in plaintext IM. - First problem was caused by calling LLOnHoverChangeableTextSegment::draw() for the same segment twice- for first and second name that were on different lines, while handleHover() was called only once. So handleHover() was called -> text was underlined -> first part of segment was drawn underlined -> its draw set style back to normal -> second part of segment was drawn without underlining. Fixed this by setting style back to normal only when drawing the last part of the segment. - Second problem was caused by unusual way of appending link to text in chat history. Changed it so that LLTextBase::appendText() now receives link not inside style params, but directly. Also added "/inspect" ending to check in LLUrlEntryAgent::underlineOnHoverOnly(). Reviewed by Richard Nelson at https://codereview.productengine.com/secondlife/r/833/ --HG-- branch : product-engine --- indra/llui/llurlentry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llurlentry.cpp') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 17d211fb36..bf7b25910f 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -366,7 +366,7 @@ std::string LLUrlEntryAgent::getTooltip(const std::string &string) const bool LLUrlEntryAgent::underlineOnHoverOnly(const std::string &string) const { std::string url = getUrl(string); - return LLStringUtil::endsWith(url, "/about"); + return LLStringUtil::endsWith(url, "/about") || LLStringUtil::endsWith(url, "/inspect"); } std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCallback &cb) -- cgit v1.2.3