X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatline.cpp;h=6ccb9f7003a73fb75761485ba16a33f68c43a8fc;hp=ce208beadf16eb04d816bb5636319dffad96f777;hb=9442592230dc6c95685bc92f298068cf84eeef6f;hpb=a3aaabf6254c8c5439af8982cc613c4ced3f50ed diff --git a/src/qtui/chatline.cpp b/src/qtui/chatline.cpp index ce208bea..6ccb9f70 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(); @@ -97,8 +97,8 @@ void ChatLine::setSecondColumn(const qreal &senderWidth, const qreal &contentsWi _contentsItem.setPos(contentsPos); - _timestampItem.clearLayout(); _senderItem.clearLayout(); + _contentsItem.clearLayout(); if(needGeometryChange) prepareGeometryChange(); @@ -181,7 +181,7 @@ void ChatLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, // don't show the marker if we wrote that new line if(!(flags & Message::Self)) { BufferId bufferId = BufferId(chatScene()->idString().toInt()); - MsgId lastSeenMsgId = Client::networkModel()->lastSeenMsgId(bufferId); + MsgId lastSeenMsgId = Client::networkModel()->lastSeenMarkerMsgId(bufferId); if(lastSeenMsgId < myMsgId && lastSeenMsgId >= prevMsgId) { QtUiStyleSettings s("Colors"); QLinearGradient gradient(0, 0, 0, contentsItem().fontMetrics()->lineSpacing());