From 709eea77bf6e7b4539ae5268b5c2811a1551b1b0 Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Wed, 22 Sep 2010 11:04:25 +0200 Subject: Revert "Keep other text format with QTextOption::SuppressColors tag on" This reverts commit 22ee6863458885c900e8294a44bd782acbdd8201. --- src/gui/text/qtextlayout.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index a7f619e..f432b7e 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2219,12 +2219,8 @@ void QTextLine::draw(QPainter *p, const QPointF &pos, const QTextLayout::FormatR QTextCharFormat format; if (eng->hasFormats() || selection) { - format = eng->format(&si); - if (suppressColors) { - format.clearForeground(); - format.clearBackground(); - format.clearProperty(QTextFormat::TextUnderlineColor); - } + if (!suppressColors) + format = eng->format(&si); if (selection) format.merge(selection->format); -- cgit v0.12