From fd3e2dc4749f2bdec27a834b0585937dc2394ad4 Mon Sep 17 00:00:00 2001
From: Eugene Mutavchi <emutavchi@productengine.com>
Date: Tue, 19 Jan 2010 21:44:04 +0200
Subject: [PATCH] Fixed low bug EXT-3890([BSI] someone has said text cutoff
 when opening and closing user list)

--HG--
branch : product-engine
---
 indra/newview/llchathistory.cpp | 8 ++++++++
 indra/newview/llchathistory.h   | 1 +
 2 files changed, 9 insertions(+)

diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 977f5c2bd03..a46cd84b608 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -609,3 +609,11 @@ void LLChatHistory::draw()
 	LLUICtrl::draw();
 }
 
+void LLChatHistory::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+	bool is_scrolled_to_end = mEditor->scrolledToEnd();
+	LLUICtrl::reshape( width, height, called_from_parent );
+	// update scroll
+	if (is_scrolled_to_end)
+		mEditor->setCursorAndScrollToEnd();
+}
diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h
index 260015e2dc8..f2d403f6393 100644
--- a/indra/newview/llchathistory.h
+++ b/indra/newview/llchathistory.h
@@ -119,6 +119,7 @@ class LLChatHistory : public LLUICtrl
 		 */
 		void appendMessage(const LLChat& chat, const bool use_plain_text_chat_history = false, const LLStyle::Params& input_append_params = LLStyle::Params());
 		/*virtual*/ void clear();
+		/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 
 	private:
 		std::string mLastFromName;
-- 
GitLab