forked from qt-creator/qt-creator
CppEditor: Fix highlighting if there are unconfigured projects
If Creator switched to the Project mode on startup, the highlighting was not started because the editor widget was not visible. Now we check if the editor itself is or would be visible in the edit mode, which is indepedent of the current mode. Task-number: QTCREATORBUG-9260 Change-Id: I72373e09965fd1cded034ae4711df48798e7f0d8 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
#include "cppmodelmanager.h"
|
||||
#include "cpplocalsymbols.h"
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
|
||||
#include <utils/runextensions.h>
|
||||
|
||||
#include <QList>
|
||||
@@ -275,7 +277,9 @@ void CppEditorSupport::startHighlighting()
|
||||
if (!m_highlightingSupport)
|
||||
return;
|
||||
|
||||
if (!m_textEditor->widget()->isVisible())
|
||||
// Start highlighting only if the editor is or would be visible
|
||||
// (in case another mode is active) in the edit mode.
|
||||
if (!Core::EditorManager::instance()->visibleEditors().contains(m_textEditor))
|
||||
return;
|
||||
|
||||
if (m_highlightingSupport->requiresSemanticInfo()) {
|
||||
|
||||
Reference in New Issue
Block a user