X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatline.cpp;h=12268a28430e217ea2cdd03a73d23059e73e424d;hp=3c68c4b0549e844e2046a3a8df9af68a013a66f6;hb=9fd12737c55a0119801c90c399c926b35ffee708;hpb=2f7cc62b4d9091d026316d0f0823ac4a6236cad8 diff --git a/src/qtui/chatline.cpp b/src/qtui/chatline.cpp index 3c68c4b0..12268a28 100644 --- a/src/qtui/chatline.cpp +++ b/src/qtui/chatline.cpp @@ -105,20 +105,20 @@ void ChatLine::setSecondColumn(const qreal &senderWidth, const qreal &contentsWi void ChatLine::setGeometryByWidth(const qreal &width, const qreal &contentsWidth, qreal &linePos) { qreal height = _contentsItem.setGeometryByWidth(contentsWidth); linePos -= height; - bool needGeometryChange = linePos == pos().y(); + bool needGeometryChange = (height != _height || width != _width); - if(needGeometryChange) { + if(height != _height) { _timestampItem.prepareGeometryChange(); + _timestampItem.setHeight(height); _senderItem.prepareGeometryChange(); + _senderItem.setHeight(height); } - _timestampItem.setHeight(height); - _senderItem.setHeight(height); - if(needGeometryChange) + if(needGeometryChange) { prepareGeometryChange(); - - _height = height; - _width = width; + _height = height; + _width = width; + } setPos(0, linePos); // set pos is _very_ cheap if nothing changes. }