Debugger: Fix debugger switching to edit mode.

... on clicking stack frames or disassembler/
memory views.

Introduce flags to openEditorAt, pass
EditorManager::NoModeSwitch where applicable.

Task-number: QTCREATORBUG-2278
This commit is contained in:
Friedemann Kleint
2010-09-07 09:51:20 +02:00
parent 9374ba00d2
commit 763b59aa73
5 changed files with 21 additions and 14 deletions

View File

@@ -140,18 +140,16 @@ protected:
} // namespace Internal
} // namespace TextEditor
ITextEditor *BaseTextEditor::openEditorAt(const QString &fileName,
int line,
int column,
const QString &editorKind,
bool *newEditor)
ITextEditor *BaseTextEditor::openEditorAt(const QString &fileName, int line, int column,
const QString &editorKind,
Core::EditorManager::OpenEditorFlags flags,
bool *newEditor)
{
Core::EditorManager *editorManager = Core::EditorManager::instance();
editorManager->cutForwardNavigationHistory();
editorManager->addCurrentPositionToNavigationHistory();
Core::IEditor *editor = editorManager->openEditor(fileName, editorKind,
Core::EditorManager::IgnoreNavigationHistory, newEditor);
flags, newEditor);
TextEditor::ITextEditor *texteditor = qobject_cast<TextEditor::ITextEditor *>(editor);
if (texteditor) {
texteditor->gotoLine(line, column);