From 5ced3405e4365a38f7bea5570881fe11b4b529e0 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Sat, 12 Sep 2009 11:53:00 +0200 Subject: [PATCH] Fix wordwrap in some cases This fixes the case where sometimes lines wouldn't wrap at the end. This is not a fix for the wrap-within-words bug, though. --- src/qtui/chatlinemodelitem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qtui/chatlinemodelitem.cpp b/src/qtui/chatlinemodelitem.cpp index 3613630e..7c130c78 100644 --- a/src/qtui/chatlinemodelitem.cpp +++ b/src/qtui/chatlinemodelitem.cpp @@ -201,11 +201,13 @@ void ChatLineModelItem::computeWrapList() const { //if(flg) qDebug() << idx << mode << wordStart << wordEnd << contents->plainText.left(idx) << contents->plainText.mid(idx); if(mode == SearchEnd || (!wordStart && wordEnd)) { - if(wordStart || !wordEnd) continue; oldidx = idx; + if(wordStart || !wordEnd) + continue; mode = SearchStart; continue; } + qreal wordendx = line.cursorToX(oldidx); qreal trailingendx = line.cursorToX(idx); word.endX = wordendx; -- 2.20.1