From bc21af4fa29a7c10445324484e290b9deb5f1dd1 Mon Sep 17 00:00:00 2001 From: krepa098 Date: Tue, 3 Feb 2015 17:28:42 +0100 Subject: [PATCH] ChatLog: don't start the resize worker if the width doesn't change --- src/chatlog/chatlog.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/chatlog/chatlog.cpp b/src/chatlog/chatlog.cpp index 1cdc4fea3..d622e0834 100644 --- a/src/chatlog/chatlog.cpp +++ b/src/chatlog/chatlog.cpp @@ -614,9 +614,19 @@ void ChatLog::scrollContentsBy(int dx, int dy) void ChatLog::resizeEvent(QResizeEvent* ev) { - startResizeWorker(); + bool stb = stickToBottom(); + + if(ev->size().width() != ev->oldSize().width()) + { + startResizeWorker(); + stb = false; // let the resize worker handle it + } + QGraphicsView::resizeEvent(ev); + if(stb) + scrollToBottom(); + updateBusyNotification(); }