When QSGText has rich text, we need to retain the block formats
already in the document instead of overwriting them. E.g. lists
would not work because of this bug.
Change-Id: I4cdae55e2358950a330c61613b5fd41e1986dc13
Reviewed-on: http://codereview.qt-project.org/6059
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
blockFormat.setLineHeight((lineHeightMode == QSGText::FixedHeight ? lineHeight : lineHeight * 100), type);
for (QTextBlock it = doc->begin(); it != doc->end(); it = it.next()) {
QTextCursor cursor(it);
- cursor.setBlockFormat(blockFormat);
+ cursor.mergeBlockFormat(blockFormat);
}
}