forked from qt-creator/qt-creator
QmlInspector: Don't show root element twice (4.x)
Change-Id: I1871f4c0d4ccb7339f4cea64e6119e0a74459630 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
@@ -755,7 +755,8 @@ void QmlInspectorAgent::addObjectToTree(const ObjectReference &obj,
|
||||
int count = m_rootObjects.count();
|
||||
for (int i = 0; i < count; i++) {
|
||||
int parentId = obj.parentId();
|
||||
if (m_engineClient->serviceVersion() < 2) {
|
||||
if (m_engineClient->serviceVersion() < 2
|
||||
&& !m_rootObjects.contains(obj)) {
|
||||
// we don't get parentId in qt 4.x
|
||||
parentId = m_rootObjects[i].insertObjectInTree(obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user