diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.cpp b/src/plugins/qmljsinspector/qmljsclientproxy.cpp index ddbe6e45e49460b83103eabe7f1d8832af28682d..3a923a12f0373438375d5f9f2c319596aea3156d 100644 --- a/src/plugins/qmljsinspector/qmljsclientproxy.cpp +++ b/src/plugins/qmljsinspector/qmljsclientproxy.cpp @@ -146,7 +146,7 @@ void ClientProxy::refreshObjectTree() } } -void ClientProxy::onCurrentObjectsChanged(const QList<int> &debugIds) +void ClientProxy::onCurrentObjectsChanged(const QList< int >& debugIds, bool requestIfNeeded) { QList<QDeclarativeDebugObjectReference> selectedItems; @@ -161,7 +161,7 @@ void ClientProxy::onCurrentObjectsChanged(const QList<int> &debugIds) // b) add children to part of an existing tree. // So the only choice that remains is to update the complete // tree when we have an unknown debug id. - if (!m_objectTreeQuery) + if (!m_objectTreeQuery && requestIfNeeded) m_objectTreeQuery = m_client->queryObjectRecursive(m_rootObject, this); break; } @@ -335,7 +335,7 @@ void ClientProxy::objectTreeFetched(QDeclarativeDebugQuery::State state) if (isDesignClientConnected()) { if (!m_designClient->selectedItemIds().isEmpty()) - onCurrentObjectsChanged(m_designClient->selectedItemIds()); + onCurrentObjectsChanged(m_designClient->selectedItemIds(), false); m_designClient->setObjectIdList(QList<QDeclarativeDebugObjectReference>() << m_rootObject); } diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.h b/src/plugins/qmljsinspector/qmljsclientproxy.h index d3539ad1f3e289ed21d8608c9e8da10d0f2b1d95..2654a74ba7453f83ca3f96ed8fcc9505a3513f56 100644 --- a/src/plugins/qmljsinspector/qmljsclientproxy.h +++ b/src/plugins/qmljsinspector/qmljsclientproxy.h @@ -121,7 +121,7 @@ private slots: void contextChanged(); - void onCurrentObjectsChanged(const QList<int> &debugIds); + void onCurrentObjectsChanged(const QList<int> &debugIds, bool requestIfNeeded = true); void updateEngineList(); void objectTreeFetched(QDeclarativeDebugQuery::State state = QDeclarativeDebugQuery::Completed);