From b4f1d778d8ea3bf86ddf1764314132e5eb9ef296 Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Tue, 28 Oct 2008 12:46:06 +0100 Subject: [PATCH] fixing chopped sender/timestamp column after column movement --- src/qtui/chatline.cpp | 2 +- src/qtui/chatscene.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qtui/chatline.cpp b/src/qtui/chatline.cpp index ce208bea..bac4991a 100644 --- a/src/qtui/chatline.cpp +++ b/src/qtui/chatline.cpp @@ -86,7 +86,7 @@ void ChatLine::setSecondColumn(const qreal &senderWidth, const qreal &contentsWi // contentsItem doesn't need a geom change as it's Pos is changed (ensured by void ChatScene::firstHandlePositionChanged(qreal xpos)) qreal height = _contentsItem.setGeometryByWidth(contentsWidth); linePos -= height; - bool needGeometryChange = linePos == pos().y() && height != _height; + bool needGeometryChange = linePos == pos().y(); if(needGeometryChange) { _timestampItem.prepareGeometryChange(); diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 20c54785..e865c455 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -75,6 +75,7 @@ ChatScene::ChatScene(QAbstractItemModel *model, const QString &idString, qreal w addItem(_secondColHandle); _secondColHandle->setXPos(_secondColHandlePos); connect(_secondColHandle, SIGNAL(positionChanged(qreal)), this, SLOT(secondHandlePositionChanged(qreal))); + connect(this, SIGNAL(sceneRectChanged(const QRectF &)), _secondColHandle, SLOT(sceneRectChanged(const QRectF &))); setHandleXLimits(); -- 2.20.1