From 2c9184c37fc54adb7670ea261a8e34c99a82a285 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Fri, 18 May 2007 10:08:14 +0000 Subject: [PATCH] Fixed formatting code %O (which should switch off all format codes, but accidentally also switched off default formatting...). --- gui/style.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/style.cpp b/gui/style.cpp index 62105529..9b845d3f 100644 --- a/gui/style.cpp +++ b/gui/style.cpp @@ -40,6 +40,7 @@ void Style::init() { colors["15"] = QColor("silver"); QTextCharFormat def; + def.setForeground(QBrush("black")); def.setFont(QFont("Verdana",9)); formats["default"] = def; @@ -49,7 +50,7 @@ void Style::init() { formats["%B"] = bold; // %O - 0x0f - plain - formats["%O"] = QTextCharFormat(); + formats["%O"] = def; // %R - 0x12 - reverse // -- - 0x16 - reverse @@ -220,6 +221,7 @@ Style::FormattedString Style::internalToFormatted(QString s) { } } else if(s[i] == 'O') { foreach(QString key, toggles.keys()) { + if(key == "default") continue; sf.formats[toggles[key]].length = j - sf.formats[toggles[key]].start; toggles.remove(key); } -- 2.20.1