Commit a2bec569 authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppEditor: Respect navigation history when using cppeditor outline

Task-number: QTCREATORBUG-12281
Change-Id: I95aef60943ec76dd035914e0d13aef7b8db8e211
Reviewed-by: default avatarDavid Schulz <david.schulz@digia.com>
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent 4ecadb38
......@@ -250,6 +250,11 @@ void CppEditorOutline::gotoSymbolInEditor()
return;
const TextEditor::BaseTextEditorWidget::Link &link = CPPEditorWidget::linkToSymbol(symbol);
if (!link.hasValidTarget())
return;
Core::EditorManager::cutForwardNavigationHistory();
Core::EditorManager::addCurrentPositionToNavigationHistory();
m_editorWidget->gotoLine(link.targetLine, link.targetColumn);
Core::EditorManager::activateEditor(m_editorWidget->editor());
}
......
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