Cut off the forward navigation history to avoid messing it up.

There are cases like when editing, or when jumping to a line, where we
shouldn't cut it though (so we don't).

Task-number: QTCREATORBUG-1535
This commit is contained in:
con
2010-07-06 12:19:27 +02:00
parent f43095ceaf
commit e1b74a647e
6 changed files with 19 additions and 3 deletions

View File

@@ -145,6 +145,7 @@ ITextEditor *BaseTextEditor::openEditorAt(const QString &fileName,
bool *newEditor)
{
Core::EditorManager *editorManager = Core::EditorManager::instance();
editorManager->cutForwardNavigationHistory();
editorManager->addCurrentPositionToNavigationHistory();
Core::IEditor *editor = editorManager->openEditor(fileName, editorKind,
Core::EditorManager::IgnoreNavigationHistory, newEditor);