diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-05-07 11:12:52 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2013-05-07 11:45:59 +0200 |
commit | 5b30509a992645ec9c067bc4d5a6f62c5af8c86c (patch) | |
tree | f3adddab5918708dedd7d5a9375d5ad6787c8802 /src/plugins/cpptools/cpptoolseditorsupport.cpp | |
parent | cacd66195c1e37cf89023ffce82a69d135c6d734 (diff) | |
download | qt-creator-5b30509a992645ec9c067bc4d5a6f62c5af8c86c.tar.gz |
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>
Diffstat (limited to 'src/plugins/cpptools/cpptoolseditorsupport.cpp')
-rw-r--r-- | src/plugins/cpptools/cpptoolseditorsupport.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp index c44683eef3..2554a9db3c 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.cpp +++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp @@ -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()) { |