From 118c68a6cf5f098e68a6bed1df18dd6832ca4d10 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Fri, 3 Oct 2008 23:42:13 +0200 Subject: [PATCH] Clear fontMetrics cache on setFormat() --- src/uisupport/uistyle.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index b2774388..d97302a5 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -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 { -- 2.20.1