From 8c785cc905a648fd48838c99387da21a97ff6819 Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Sun, 12 Oct 2008 14:00:32 +0200 Subject: [PATCH] Disabling indexing in the ChatScene as a workaround to keep quassel from crashing (ie. webpreviews) --- src/qtui/chatscene.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 40a0c8b0..89d4422a 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -96,7 +96,7 @@ ChatScene::ChatScene(QAbstractItemModel *model, const QString &idString, qreal w connect(&webPreview.delayTimer, SIGNAL(timeout()), this, SLOT(showWebPreview())); // installEventFilter(this); - // setItemIndexMethod(QGraphicsScene::NoIndex); + setItemIndexMethod(QGraphicsScene::NoIndex); } ChatScene::~ChatScene() { @@ -192,6 +192,10 @@ void ChatScene::rowsInserted(const QModelIndex &index, int start, int end) { } } + // check if all went right + Q_ASSERT(start == 0 || _lines.at(start - 1)->pos().y() + _lines.at(start - 1)->height() == _lines.at(start)->pos().y()); + Q_ASSERT(end + 1 == _lines.count() || _lines.at(end)->pos().y() + _lines.at(end)->height() == _lines.at(end + 1)->pos().y()); + if(!atBottom) { if(start < _firstLineRow) { int prevFirstLineRow = _firstLineRow + (end - start + 1); -- 2.20.1