forked from qt-creator/qt-creator
TextEditors: Avoid multiple highlighting runs when changing font setting
And remove some unnecessary code in Python editor Change-Id: I86cde74c244a16d1b36b0ac0e841ef8110ba832f Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -5429,11 +5429,7 @@ void BaseTextEditorWidget::applyFontSettings()
|
||||
slotUpdateExtraAreaWidth(); // Adjust to new font width
|
||||
updateCurrentLineHighlight(); // Make sure it takes the new color
|
||||
|
||||
SyntaxHighlighter *highlighter = baseTextDocument()->syntaxHighlighter();
|
||||
if (highlighter) {
|
||||
highlighter->setFontSettings(fs);
|
||||
highlighter->rehighlight();
|
||||
}
|
||||
baseTextDocument()->ensureFontSettingsApplied();
|
||||
}
|
||||
|
||||
void BaseTextEditorWidget::setDisplaySettings(const DisplaySettings &ds)
|
||||
|
||||
Reference in New Issue
Block a user