diff --git a/retroshare-gui/src/gui/PeersDialog.cpp b/retroshare-gui/src/gui/PeersDialog.cpp index 6675ed9f8..6ade7b5ab 100644 --- a/retroshare-gui/src/gui/PeersDialog.cpp +++ b/retroshare-gui/src/gui/PeersDialog.cpp @@ -779,7 +779,8 @@ void PeersDialog::insertChat() QScrollBar *qsb = msgWidget->verticalScrollBar(); int oldQsbValue = qsb->value(); - bool maxQsbValue = (qsb->maximum() == qsb->value()); + //check if the scroll bar is at the bottom. If t is, we will putt it at the bottom after the new message + bool maxQsbValue = ((qsb->maximum() - 30) < qsb->value()); msgWidget->setHtml(currenttxt); msgWidget->update(); diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp index 904be3eb5..d58db6978 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp @@ -222,7 +222,8 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci) //store the state of the vertical scrollbar to set it at the end of the function QScrollBar *qsb = ui.textBrowser->verticalScrollBar(); int oldQsbValue = qsb->value(); - bool maxQsbValue = (qsb->maximum() == qsb->value()); + //check if the scroll bar is at the bottom. If t is, we will putt it at the bottom after the new message + bool maxQsbValue = ((qsb->maximum() - 30) < qsb->value()); bool offline = true;