mirror of
https://github.com/fralx/LimeReport.git
synced 2025-01-11 17:18:10 +03:00
TextItem render has been fixed
This commit is contained in:
parent
36ed9443f7
commit
b3529ffd0c
@ -491,18 +491,20 @@ TextItem::TextPtr TextItem::textDocument() const
|
|||||||
setTextFont(text,_font);
|
setTextFont(text,_font);
|
||||||
}
|
}
|
||||||
|
|
||||||
text->documentLayout();
|
//text->documentLayout();
|
||||||
|
if (m_lineSpacing != 1 || m_textIndent !=0 ){
|
||||||
|
|
||||||
for ( QTextBlock block = text->begin(); block.isValid(); block = block.next())
|
for ( QTextBlock block = text->begin(); block.isValid(); block = block.next())
|
||||||
{
|
{
|
||||||
QTextCursor tc = QTextCursor(block);
|
QTextCursor tc = QTextCursor(block);
|
||||||
QTextBlockFormat fmt = block.blockFormat();
|
QTextBlockFormat fmt = block.blockFormat();
|
||||||
fmt.setTextIndent(m_textIndent);
|
fmt.setTextIndent(m_textIndent);
|
||||||
|
if (fmt.lineHeight() != m_lineSpacing) {
|
||||||
if(fmt.lineHeight() != m_lineSpacing) {
|
|
||||||
fmt.setLineHeight(m_lineSpacing,QTextBlockFormat::LineDistanceHeight);
|
fmt.setLineHeight(m_lineSpacing,QTextBlockFormat::LineDistanceHeight);
|
||||||
|
}
|
||||||
tc.setBlockFormat( fmt );
|
tc.setBlockFormat( fmt );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
|
Loading…
Reference in New Issue
Block a user