# HG changeset patch
# User unc0rr
# Date 1381170169 -14400
# Node ID 23c674bfa2e2a8feeb124a08f705998e28f2a6b1
# Parent  e9f124a10804f3ce0964a685d55f6b4754bd8a1c
Scroll chat widget to bottom on show and resize events

diff -r e9f124a10804 -r 23c674bfa2e2 QTfrontend/ui/widget/chatwidget.cpp
--- a/QTfrontend/ui/widget/chatwidget.cpp	Fri Oct 04 18:41:06 2013 +0400
+++ b/QTfrontend/ui/widget/chatwidget.cpp	Mon Oct 07 22:22:49 2013 +0400
@@ -930,3 +930,17 @@
         chatText->verticalScrollBar()->setValue(m_scrollBarPos);
     }
 }
+
+void HWChatWidget::resizeEvent(QResizeEvent * event)
+{
+    Q_UNUSED(event);
+
+    afterContentAdd();
+}
+
+void HWChatWidget::showEvent(QShowEvent * event)
+{
+    Q_UNUSED(event);
+
+     afterContentAdd();
+}
diff -r e9f124a10804 -r 23c674bfa2e2 QTfrontend/ui/widget/chatwidget.h
--- a/QTfrontend/ui/widget/chatwidget.h	Fri Oct 04 18:41:06 2013 +0400
+++ b/QTfrontend/ui/widget/chatwidget.h	Mon Oct 07 22:22:49 2013 +0400
@@ -68,6 +68,8 @@
     protected:
         virtual void dragEnterEvent(QDragEnterEvent * event);
         virtual void dropEvent(QDropEvent * event);
+        virtual void resizeEvent(QResizeEvent * event);
+        virtual void showEvent(QShowEvent * event);
 
     private:
         static QString * s_styleSheet;