Add position to navigation history when navigating through outline

This commit is contained in:
Kai Koehne
2010-07-14 12:21:23 +02:00
parent 8a3c1cc0d4
commit 5aea93028f
3 changed files with 15 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
#include <Symbol.h>
#include <coreplugin/ifile.h>
#include <coreplugin/editormanager/editormanager.h>
#include <cplusplus/OverviewModel.h>
#include <QtCore/QDebug>
@@ -126,6 +127,10 @@ void CppOutlineWidget::updateSelectionInText(const QItemSelection &selection)
if (debug)
qDebug() << "CppOutline - moving cursor to" << line << column - 1;
Core::EditorManager *editorManager = Core::EditorManager::instance();
editorManager->cutForwardNavigationHistory();
editorManager->addCurrentPositionToNavigationHistory();
// line has to be 1 based, column 0 based!
m_editor->gotoLine(line, column - 1);
m_blockCursorSync = false;