Commit 65ff19e7 authored by Roberto Raggi's avatar Roberto Raggi

Postpone the update of the ifdefedOut blocks.

parent fcf4d6fd
......@@ -760,7 +760,6 @@ void CppModelManager::onDocumentUpdated(Document::Ptr doc)
foreach (const Document::Block &block, doc->skippedBlocks()) {
blockRanges.append(TextEditor::BaseTextEditor::BlockRange(block.begin(), block.end()));
}
ed->setIfdefedOutBlocks(blockRanges);
QList<QTextEdit::ExtraSelection> selections;
......@@ -827,6 +826,7 @@ void CppModelManager::onDocumentUpdated(Document::Ptr doc)
Editor e;
e.widget = ed;
e.selections = selections;
e.ifdefedOutBlocks = blockRanges;
todo.append(e);
m_todo = todo;
postEditorUpdate();
......@@ -848,6 +848,8 @@ void CppModelManager::updateEditorSelections()
ed.widget->setExtraSelections(TextEditor::BaseTextEditor::CodeWarningsSelection,
ed.selections);
ed.widget->setIfdefedOutBlocks(ed.ifdefedOutBlocks);
}
m_todo.clear();
......
......@@ -38,6 +38,8 @@
#include <projectexplorer/project.h>
#include <cplusplus/CppDocument.h>
#include <texteditor/basetexteditor.h>
#include <QMap>
#include <QFutureInterface>
#include <QMutex>
......@@ -171,6 +173,7 @@ private:
struct Editor {
QPointer<TextEditor::BaseTextEditor> widget;
QList<QTextEdit::ExtraSelection> selections;
QList<TextEditor::BaseTextEditor::BlockRange> ifdefedOutBlocks;
};
QList<Editor> m_todo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment