X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatview.cpp;h=6344c9c2c23564d71566c42f58d02dd21a8eae36;hp=6bdc650a5fbb978516d22f1b54270832ab94bdfd;hb=ba934ceb1bfe30d01d5fb5c072c3197f8080be04;hpb=3d680525678f840e30cef959ff91ee8c7e3d2e17 diff --git a/src/qtui/chatview.cpp b/src/qtui/chatview.cpp index 6bdc650a..6344c9c2 100644 --- a/src/qtui/chatview.cpp +++ b/src/qtui/chatview.cpp @@ -52,6 +52,7 @@ void ChatView::init(MessageFilter *filter) { _scene = new ChatScene(filter, filter->idString(), viewport()->width() - 2, this); // see below: resizeEvent() connect(_scene, SIGNAL(sceneHeightChanged(qreal)), this, SLOT(sceneHeightChanged(qreal))); + connect(_scene, SIGNAL(sceneRectChanged(const QRectF &)), this, SLOT(sceneRectChanged(const QRectF &))); setScene(_scene); _lastScrollbarPos = verticalScrollBar()->maximum(); @@ -75,6 +76,9 @@ void ChatView::verticalScrollbarChanged(int newPos) { QAbstractSlider *vbar = verticalScrollBar(); Q_ASSERT(vbar); + if(vbar->maximum() - vbar->value() <= 5) // FIXME workaround the fact that the view gets scrolled up a few px on buffer change + vbar->setValue(vbar->maximum()); + if(newPos < _lastScrollbarPos) { int relativePos = 100; if(vbar->maximum() - vbar->minimum() != 0)