Browse Source

ChatLog: don't start the resize worker if the width doesn't change

pull/974/head
krepa098 11 years ago
parent
commit
bc21af4fa2
  1. 10
      src/chatlog/chatlog.cpp

10
src/chatlog/chatlog.cpp

@ -613,10 +613,20 @@ void ChatLog::scrollContentsBy(int dx, int dy)
} }
void ChatLog::resizeEvent(QResizeEvent* ev) void ChatLog::resizeEvent(QResizeEvent* ev)
{
bool stb = stickToBottom();
if(ev->size().width() != ev->oldSize().width())
{ {
startResizeWorker(); startResizeWorker();
stb = false; // let the resize worker handle it
}
QGraphicsView::resizeEvent(ev); QGraphicsView::resizeEvent(ev);
if(stb)
scrollToBottom();
updateBusyNotification(); updateBusyNotification();
} }

Loading…
Cancel
Save