X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.cpp;h=72099e672202b3bf03f1cf7476d31e7a9e7366f1;hp=10ebfc7a6a4253f1744bef3239763d49e03dc3be;hb=69617bf3e612562feda908587c5fec2c50b77aaf;hpb=0a05c86756e0efe65fe0e19233fbdbdd48b58793 diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 10ebfc7a..72099e67 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -67,6 +67,7 @@ void ChatScene::rowsInserted(const QModelIndex &index, int start, int end) { for(int i = end+1; i < _lines.count(); i++) { _lines.value(i)->moveBy(0, h); } + setSceneRect(QRectF(0, 0, _width, _height)); emit heightChanged(height()); } } @@ -78,7 +79,8 @@ void ChatScene::setWidth(int w) { line->setPos(0, _height); _height += line->setColumnWidths(_timestampWidth, _senderWidth, w - _timestampWidth - _senderWidth); } - emit heightChanged(_height); + setSceneRect(QRectF(0, 0, w, _height)); + emit heightChanged(height()); } void ChatScene::mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent ) {