Clear fontMetrics cache on setFormat()
authorManuel Nickschas <sputnick@quassel-irc.org>
Fri, 3 Oct 2008 21:42:13 +0000 (23:42 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sat, 4 Oct 2008 21:53:28 +0000 (23:53 +0200)
src/uisupport/uistyle.cpp

index b277438..d97302a 100644 (file)
@@ -145,6 +145,7 @@ void UiStyle::setFormat(FormatType ftype, QTextCharFormat fmt, Settings::Mode mo
   }
   // TODO: invalidate only affected cached formats... if that's possible with less overhead than just rebuilding them
   _cachedFormats.clear();
+  _cachedFontMetrics.clear();
 }
 
 QTextCharFormat UiStyle::format(FormatType ftype, Settings::Mode mode) const {