X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatview.cpp;h=eeaaf56519cc836a94e011adc0cab33e209a4bd3;hp=fe15416bb8b421c4e0ee252e7f3e5b71c4a19884;hb=39e2a78383295f86c5aa2dadbeac6f02b53eb7a4;hpb=69617bf3e612562feda908587c5fec2c50b77aaf diff --git a/src/qtui/chatview.cpp b/src/qtui/chatview.cpp index fe15416b..eeaaf565 100644 --- a/src/qtui/chatview.cpp +++ b/src/qtui/chatview.cpp @@ -35,13 +35,14 @@ ChatView::ChatView(Buffer *buf, QWidget *parent) : QGraphicsView(parent), Abstra |QGraphicsView::DontSavePainterState |QGraphicsView::DontAdjustForAntialiasing); setAlignment(Qt::AlignBottom); + setInteractive(true); QList filterList; filterList.append(buf->bufferInfo().bufferId()); MessageFilter *filter = new MessageFilter(Client::messageModel(), filterList, this); _scene = new ChatScene(filter, this); - connect(_scene, SIGNAL(heightChanged(int)), this, SLOT(sceneHeightChanged(int))); + connect(_scene, SIGNAL(heightChanged(qreal)), this, SLOT(sceneHeightChanged(qreal))); setScene(_scene); } @@ -60,7 +61,8 @@ void ChatView::resizeEvent(QResizeEvent *event) { verticalScrollBar()->setValue(verticalScrollBar()->maximum()); } -void ChatView::sceneHeightChanged(int h) { +void ChatView::sceneHeightChanged(qreal h) { + Q_UNUSED(h) bool scrollable = verticalScrollBar()->value() == verticalScrollBar()->maximum(); setSceneRect(scene()->sceneRect()); if(scrollable) verticalScrollBar()->setValue(verticalScrollBar()->maximum());