From: Manuel Nickschas Date: Sun, 5 Nov 2006 16:27:57 +0000 (+0000) Subject: Small fix in scrollbar behavior. Still not cool, but at least not as annoying anymore. X-Git-Tag: 0.1.0~254 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=59a71bb6795f9cf4b470742816ccf61afe1de9b0;hp=d6a96a47a3964b9c0b1ea2413601d70d0d327413 Small fix in scrollbar behavior. Still not cool, but at least not as annoying anymore. Also got rid of these stupid debug messages. --- diff --git a/gui/buffer.cpp b/gui/buffer.cpp index 2eeda622..4718b287 100644 --- a/gui/buffer.cpp +++ b/gui/buffer.cpp @@ -55,7 +55,10 @@ void Buffer::scrollToEnd() { } QWidget * Buffer::showWidget(QWidget *parent) { - if(widget) return qobject_cast(widget); + if(widget) { + widget->scrollToEnd(); + return qobject_cast(widget); + } widget = new BufferWidget(networkName, bufferName, isActive(), ownNick, contents, parent); widget->setTopic(topic); widget->updateNickList(nicks); @@ -185,7 +188,7 @@ void BufferWidget::renderContents() { void BufferWidget::scrollToEnd() { QScrollBar *sb = ui.chatWidget->verticalScrollBar(); sb->setValue(sb->maximum()); - qDebug() << bufferName << "scrolled" << sb->value() << sb->maximum(); + //qDebug() << bufferName << "scrolled" << sb->value() << sb->maximum(); } QString BufferWidget::htmlFromMsg(Message msg) {