Load default formats correctly in all cases
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 6 Aug 2008 00:33:02 +0000 (02:33 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 6 Aug 2008 00:33:02 +0000 (02:33 +0200)
src/uisupport/uistyle.cpp

index b0db2ab..72920ba 100644 (file)
@@ -117,7 +117,7 @@ void UiStyle::setFormat(FormatType ftype, QTextCharFormat fmt, Settings::Mode mo
       _customFormats[ftype] = fmt;
       s.setCustomFormat(ftype, fmt);
     } else {
       _customFormats[ftype] = fmt;
       s.setCustomFormat(ftype, fmt);
     } else {
-      _customFormats[ftype] = QTextFormat().toCharFormat();
+      _customFormats.remove(ftype);
       s.removeCustomFormat(ftype);
     }
   }
       s.removeCustomFormat(ftype);
     }
   }