X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.cpp;h=411cdb85e1c3a4f62f9172a6f9d10197b1c258f0;hb=f2842f9ac96039f2b5071851420cec06f3cde657;hp=19f48ff20f60b13ac17b0faa0d9268567e18dff4;hpb=46865cac259e0b6e2ee37f8a1d8703e1898219f4;p=quassel.git diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 19f48ff2..411cdb85 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -92,15 +92,15 @@ ChatScene::ChatScene(QAbstractItemModel *model, const QString &idString, qreal w setHandleXLimits(); + if(model->rowCount() > 0) + rowsInserted(QModelIndex(), 0, model->rowCount() - 1); + connect(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(rowsInserted(const QModelIndex &, int, int))); connect(model, SIGNAL(rowsAboutToBeRemoved(const QModelIndex &, int, int)), this, SLOT(rowsAboutToBeRemoved(const QModelIndex &, int, int))); connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), SLOT(dataChanged(QModelIndex, QModelIndex))); - if(model->rowCount() > 0) - rowsInserted(QModelIndex(), 0, model->rowCount() - 1); - #ifdef HAVE_WEBKIT webPreview.timer.setSingleShot(true); connect(&webPreview.timer, SIGNAL(timeout()), this, SLOT(webPreviewNextStep()));