Commit ce57387f authored by Lasse Holmstedt's avatar Lasse Holmstedt
Browse files

Fixed jumping to edit/design mode when debugging qml files

parent affdf1c4
......@@ -491,12 +491,13 @@ void QmlInspector::treeObjectActivated(const QDeclarativeDebugObjectReference &o
return;
Core::EditorManager *editorManager = Core::EditorManager::instance();
TextEditor::ITextEditor *editor = qobject_cast<TextEditor::ITextEditor*>(editorManager->openEditor(fileName));
if (editor) {
editorManager->ensureEditorManagerVisible();
Core::IEditor *editor = editorManager->openEditor(fileName, QString(), Core::EditorManager::NoModeSwitch);
TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor*>(editor);
if (textEditor) {
editorManager->addCurrentPositionToNavigationHistory();
editor->gotoLine(source.lineNumber());
editor->widget()->setFocus();
textEditor->gotoLine(source.lineNumber());
textEditor->widget()->setFocus();
}
}
......
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