From 71fe3435f2cff4ddc5aec831ecbb33d6550e4b14 Mon Sep 17 00:00:00 2001 From: mae <qtc-committer@nokia.com> Date: Wed, 18 Mar 2009 19:20:28 +0100 Subject: [PATCH] when jumping to methods in the same file, stay in the same editor (split corner case) --- src/plugins/cppeditor/cppeditor.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index c4fc65a1045..e356e378cf0 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -977,5 +977,14 @@ bool CPPEditor::openEditorAt(Symbol *s) if (s->isGenerated()) column = 0; + if (baseTextDocument()->fileName() == fileName) { + Core::EditorManager *editorManager = Core::EditorManager::instance(); + editorManager->addCurrentPositionToNavigationHistory(true); + gotoLine(line, column); + editorManager->addCurrentPositionToNavigationHistory(); + setFocus(); + return true; + } + return openCppEditorAt(fileName, line, column); } -- GitLab