From 36e0025d6e8292d35a7be1ccffcf2c94cf8bcfed Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 2 Mar 2016 15:13:32 +0100 Subject: [PATCH] TextEditor: Fix mixin font settings We don't clear the cache so that changes in the font settings are not reflected in the editor. Change-Id: I9d54992d0770b42e1055e99d9e8a2866dd698672 Reviewed-by: David Schulz --- src/plugins/texteditor/fontsettings.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp index 6be14966d20..845be96af42 100644 --- a/src/plugins/texteditor/fontsettings.cpp +++ b/src/plugins/texteditor/fontsettings.cpp @@ -68,6 +68,7 @@ void FontSettings::clear() m_antialias = DEFAULT_ANTIALIAS; m_scheme.clear(); m_formatCache.clear(); + m_textCharFormatCache.clear(); } void FontSettings::toSettings(const QString &category, @@ -259,6 +260,7 @@ void FontSettings::setFamily(const QString &family) { m_family = family; m_formatCache.clear(); + m_textCharFormatCache.clear(); } /** @@ -273,6 +275,7 @@ void FontSettings::setFontSize(int size) { m_fontSize = size; m_formatCache.clear(); + m_textCharFormatCache.clear(); } /** @@ -287,6 +290,7 @@ void FontSettings::setFontZoom(int zoom) { m_fontZoom = zoom; m_formatCache.clear(); + m_textCharFormatCache.clear(); } QFont FontSettings::font() const @@ -308,6 +312,7 @@ void FontSettings::setAntialias(bool antialias) { m_antialias = antialias; m_formatCache.clear(); + m_textCharFormatCache.clear(); } /** @@ -345,6 +350,7 @@ bool FontSettings::loadColorScheme(const QString &fileName, const FormatDescriptions &descriptions) { m_formatCache.clear(); + m_textCharFormatCache.clear(); bool loaded = true; m_schemeFileName = fileName; @@ -392,6 +398,7 @@ void FontSettings::setColorScheme(const ColorScheme &scheme) { m_scheme = scheme; m_formatCache.clear(); + m_textCharFormatCache.clear(); } static QString defaultFontFamily()