From b4a3b65a602ad56baf761a8426093eda585bc572 Mon Sep 17 00:00:00 2001 From: angela Date: Thu, 12 Nov 2009 23:02:41 +0800 Subject: fix merge error --- indra/newview/llchathistory.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'indra/newview/llchathistory.cpp') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 6d8d11ad2b..2b050f3eb5 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -338,11 +338,22 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) LLView* view = NULL; std::string view_text = "\n[" + formatCurrentTime() + "] " + chat.mFromName + ": "; + LLInlineViewSegment::Params p; p.force_newline = true; p.left_pad = mLeftWidgetPad; p.right_pad = mRightWidgetPad; + + LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); + LLViewerChat::getChatColor(chat,txt_color); + LLFontGL* fontp = LLViewerChat::getChatFont(); + + LLStyle::Params style_params; + style_params.color(txt_color); + style_params.font(fontp); + + if (mLastFromName == chat.mFromName) { view = getSeparator(); @@ -357,6 +368,7 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) else p.top_pad = mTopHeaderPad; p.bottom_pad = mBottomHeaderPad; + } p.view = view; @@ -371,18 +383,8 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) appendWidget(p, view_text, false); //Append the text message - - LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); - LLViewerChat::getChatColor(chat,txt_color); - LLFontGL* fontp = LLViewerChat::getChatFont(); - - std::string message = chat.mText + '\n'; - - LLStyle::Params style_params; - style_params.color(txt_color); - style_params.font(fontp); - appendText(message, FALSE, style_params); + appendText(chat.mText, FALSE, style_params); mLastFromName = chat.mFromName; blockUndo(); -- cgit v1.2.3