Qml Live Preview: Match debug Id for new created objects.

This commit is contained in:
Olivier Goffart
2010-07-19 15:10:36 +02:00
parent 84e61ebc4e
commit 1ce574f19e
6 changed files with 75 additions and 6 deletions

View File

@@ -251,6 +251,8 @@ void Inspector::createPreviewForEditor(Core::IEditor *newEditor)
if (newEditor && newEditor->id() == QmlJSEditor::Constants::C_QMLJSEDITOR_ID) {
QString filename = newEditor->file()->fileName();
QmlJS::Document::Ptr doc = modelManager()->snapshot().document(filename);
if (!doc || !doc->qmlProgram())
return;
if (m_textPreviews.contains(filename)) {
m_textPreviews.value(filename)->associateEditor(newEditor);