X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatitem.cpp;h=7dd7aba82df027599a95830bd5ca6c79d95d7a58;hp=127d3bad3843df0d40f78c226ad1d18343df5c71;hb=62192fb6cd9cc211b5b9fe844c9b4c2f98f923cc;hpb=630dbdaf56fcee546387275898bde59426da71cb diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index 127d3bad..7dd7aba8 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -63,6 +63,7 @@ qreal ChatItem::setGeometry(qreal w, qreal h) { prepareGeometryChange(); _boundingRect.setWidth(w); if(h < 0) h = computeHeight(); + //if(h < 0) h = fontMetrics()->lineSpacing(); // only contents can be multi-line _boundingRect.setHeight(h); if(haveLayout()) updateLayout(); return h; @@ -332,13 +333,15 @@ void ContentsChatItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) { /*************************************************************************************************/ -ContentsChatItem::WrapColumnFinder::WrapColumnFinder(ChatItem *_item) : item(_item) { - wrapList = item->data(ChatLineModel::WrapListRole).value(); - wordidx = 0; - layout = 0; - lastwrapcol = 0; - lastwrappos = 0; - w = 0; +ContentsChatItem::WrapColumnFinder::WrapColumnFinder(ChatItem *_item) + : item(_item), + layout(0), + wrapList(item->data(ChatLineModel::WrapListRole).value()), + wordidx(0), + lastwrapcol(0), + lastwrappos(0), + w(0) +{ } ContentsChatItem::WrapColumnFinder::~WrapColumnFinder() {