Correctly resize ChatView height on disconnect
[quassel.git] / src / qtui / chatscene.cpp
index cb06e74..681996a 100644 (file)
@@ -140,6 +140,7 @@ void ChatScene::modelReset() {
   }
   _lines.clear();
   setSceneRect(QRectF(0, 0, _width, 0));
+  emit heightChanged(0);
 }
 
 void ChatScene::setWidth(qreal w) {
@@ -239,6 +240,8 @@ void ChatScene::updateSelection(const QPointF &pos) {
   if(newstart == newend && minColumn == ChatLineModel::ContentsColumn) {
     _lines[curRow]->setSelected(false);
     _isSelecting = false;
+    Q_ASSERT(_selectingItem); // this seems to not always be true, but I have no idea why
+                              // adding this assert to make sure the occasional segfault is caused by this
     _selectingItem->continueSelecting(_selectingItem->mapFromScene(pos));
   }
 }