diff --git a/limereport/items/lrtextitem.cpp b/limereport/items/lrtextitem.cpp index 7d61562..421675d 100644 --- a/limereport/items/lrtextitem.cpp +++ b/limereport/items/lrtextitem.cpp @@ -655,11 +655,11 @@ BaseDesignIntf *TextItem::cloneBottomPart(int height, QObject *owner, QGraphicsI loop_exit:; int textPos=0; - for (;curBlock!=m_text->end();curBlock=curBlock.next(),curLine=0){ + for (;curBlock!=m_text->end() || curLinelineCount();curLine++){ if (tmpText=="") textPos= curBlock.layout()->lineAt(curLine).textStart(); tmpText+=curBlock.text().mid(curBlock.layout()->lineAt(curLine).textStart(), - curBlock.layout()->lineAt(curLine).textLength()) + "\n"; + curBlock.layout()->lineAt(curLine).textLength()); } } tmpText.chop(1);