From 1c9e8db29e883328f78cd9ab668b066fddc54525 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 5 Oct 2011 13:50:07 +0200 Subject: [PATCH] Don't overwrite block formats in QSGText 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 Reviewed-by: Jiang Jiang --- src/declarative/items/qsgtext.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/declarative/items/qsgtext.cpp b/src/declarative/items/qsgtext.cpp index 5b72eab..8e5ef7a 100644 --- a/src/declarative/items/qsgtext.cpp +++ b/src/declarative/items/qsgtext.cpp @@ -258,7 +258,7 @@ void QSGTextPrivate::updateLayout() 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); } } -- 1.7.2.5