CppEditor: Fix semantic highlighting when zooming

...for the not visible documents.

First reset the extra additional formats, then set the new ones, not the
other way around.

Task-number: QTCREATORBUG-14579
Change-Id: Iae465bd9a7bb0a397fd4917df45955713aaf87c5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-06-19 14:43:41 +02:00
parent 4e2905f880
commit e50aafafe3
8 changed files with 19 additions and 13 deletions

View File

@@ -54,10 +54,6 @@ SemanticHighlighter::SemanticHighlighter(TextEditor::TextDocument *baseTextDocum
, m_revision(0)
{
QTC_CHECK(m_baseTextDocument);
connect(baseTextDocument, &TextEditor::TextDocument::fontSettingsChanged,
this, &SemanticHighlighter::onDocumentFontSettingsChanged);
updateFormatMapFromFontSettings();
}
@@ -92,12 +88,6 @@ void SemanticHighlighter::run()
m_watcher->setFuture(m_highlightingRunner());
}
void SemanticHighlighter::onDocumentFontSettingsChanged()
{
updateFormatMapFromFontSettings();
run();
}
void SemanticHighlighter::onHighlighterResultAvailable(int from, int to)
{
if (documentRevision() != m_revision)