Commit 4fe5e3be authored by Christiaan Janssen's avatar Christiaan Janssen
Browse files

QmlInspector: avoiding feedback loop between inspector and editor

parent 1b1b5032
...@@ -680,9 +680,13 @@ void InspectorUi::gotoObjectReferenceDefinition(const QDeclarativeDebugObjectRef ...@@ -680,9 +680,13 @@ void InspectorUi::gotoObjectReferenceDefinition(const QDeclarativeDebugObjectRef
fileName = m_projectFinder.findFile(fileName); fileName = m_projectFinder.findFile(fileName);
Core::EditorManager *editorManager = Core::EditorManager::instance(); Core::EditorManager *editorManager = Core::EditorManager::instance();
Core::IEditor *currentEditor = editorManager->currentEditor();
Core::IEditor *editor = editorManager->openEditor(fileName); Core::IEditor *editor = editorManager->openEditor(fileName);
TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor*>(editor); TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor*>(editor);
if (currentEditor != editor)
m_selectionCallbackExpected = true;
if (textEditor) { if (textEditor) {
QDeclarativeDebugObjectReference ref = objectReferenceForLocation(fileName); QDeclarativeDebugObjectReference ref = objectReferenceForLocation(fileName);
if (ref.debugId() != obj.debugId()) if (ref.debugId() != obj.debugId())
......
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