From ae4993f8a54851a93af8e65dc2ad5cdddfbd8d72 Mon Sep 17 00:00:00 2001 From: Olivier Goffart <olivier.goffart@nokia.com> Date: Tue, 20 Jul 2010 14:09:26 +0200 Subject: [PATCH] Qml Live Preview: when adding new items, only add the root The root is enough because the rest of the tree will be added as the root is added --- src/plugins/qmljsinspector/qmljsdelta.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmljsinspector/qmljsdelta.cpp b/src/plugins/qmljsinspector/qmljsdelta.cpp index 4c9c514b6d4..17787fd9d0c 100644 --- a/src/plugins/qmljsinspector/qmljsdelta.cpp +++ b/src/plugins/qmljsinspector/qmljsdelta.cpp @@ -437,8 +437,11 @@ Delta::DebugIdMap Delta::operator()(const Document::Ptr &doc1, const Document::P continue; if (!M.way2.contains(y)) { - qDebug () << "Delta::operator(): insert " << label(y, doc2) << " to " << label(parents2.parent.value(y), doc2); - insert(y, parents2.parent.value(y), newDebuggIds.value(parents2.parent.value(y)), doc2); + UiObjectMember* parent = parents2.parent.value(y); + if (!M.way2.contains(parent)) + continue; + qDebug () << "Delta::operator(): insert " << label(y, doc2) << " to " << label(parent, doc2); + insert(y, parent, newDebuggIds.value(parent), doc2); continue; } UiObjectMember *x = M.way2[y]; -- GitLab