diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-17 20:15:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-17 20:15:17 +0300 |
commit | 04bc4f2b057c99a7b82ab95973180381824c85ab (patch) | |
tree | 3b1620539b06d3a62e5c795d985950facde283db | |
parent | 4e4f7204f8e0f67924ced03be6330b6bc8766c28 (diff) | |
download | plus-04bc4f2b057c99a7b82ab95973180381824c85ab.tar.gz plus-04bc4f2b057c99a7b82ab95973180381824c85ab.tar.bz2 plus-04bc4f2b057c99a7b82ab95973180381824c85ab.tar.xz plus-04bc4f2b057c99a7b82ab95973180381824c85ab.zip |
Fix chat auto scroll to down if input field is visible.
-rw-r--r-- | src/gui/widgets/chattab.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index e27af8b25..785bdd6be 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -249,12 +249,13 @@ void ChatTab::chatLog(std::string line, Own own, // We look if the Vertical Scroll Bar is set at the max before // adding a row, otherwise the max will always be a row higher // at comparison. - if (mScrollArea->getVerticalScrollAmount() >= + if (mScrollArea->getVerticalScrollAmount() + 2 >= mScrollArea->getVerticalMaxScroll()) { addRow(line); mScrollArea->setVerticalScrollAmount( mScrollArea->getVerticalMaxScroll()); + } else { |