diff options
author | Dessie Linden <dessie@lindenlab.com> | 2010-07-06 13:22:22 -0700 |
---|---|---|
committer | Dessie Linden <dessie@lindenlab.com> | 2010-07-06 13:22:22 -0700 |
commit | a6b108641489caca1717b98cb888ef2de923f1fc (patch) | |
tree | afbd1e6a8e5e64357ceb2193e505f6a217d758bd /indra/newview/llchathistory.cpp | |
parent | ef735d839317c5d8837c3ce9afd66cb576a2ba94 (diff) | |
parent | dc6c35e353b991db2651d26bc76e5b3ee9921157 (diff) |
Merged from viewer-release after resolving conflicts
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r-- | indra/newview/llchathistory.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index ac12bffdfb..c0fa910f86 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -557,11 +557,14 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL { bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean(); - if(mEditor) + llassert(mEditor); + if (!mEditor) { - mEditor->setPlainText(use_plain_text_chat_history); + return; } + mEditor->setPlainText(use_plain_text_chat_history); + if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty()) { mUnreadChatSources.insert(chat.mFromName); @@ -740,7 +743,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL mIsLastMessageFromLog = message_from_log; } - if (chat.mNotifId.notNull()) + if (chat.mNotifId.notNull()) { LLNotificationPtr notification = LLNotificationsUtil::find(chat.mNotifId); if (notification != NULL) @@ -832,6 +835,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL mEditor->appendText(message, FALSE, style_params); } + mEditor->blockUndo(); // automatically scroll to end when receiving chat from myself |