OSDN Git Service

QmlJSInspector: Sync crumble path selection back to the observer
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Thu, 12 May 2011 11:20:48 +0000 (13:20 +0200)
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Thu, 12 May 2011 13:39:11 +0000 (15:39 +0200)
Now selecting an item via the crumble path modifies the selection in the
observed QML application accordingly.

Reviewed-by: Christiaan Janssen
src/plugins/qmljsinspector/qmljsinspector.cpp

index b92d9e2..1b68e96 100644 (file)
@@ -543,6 +543,7 @@ void InspectorUi::selectItems(const QList<QDeclarativeDebugObjectReference> &obj
             m_propertyInspector->setCurrentObjects(selectionList);
             populateCrumblePath(objref);
             gotoObjectReferenceDefinition(objref);
+            m_clientProxy->setSelectedItemsByObjectId(selectionList);
             return;
         }
     }
@@ -761,11 +762,8 @@ void InspectorUi::setupDockWidgets()
 
 void InspectorUi::crumblePathElementClicked(int debugId)
 {
-    if (debugId != -1) {
-        QList<int> l;
-        l << debugId;
-        selectItems(l);
-    }
+    if (debugId != -1)
+        selectItems(QList<int>() << debugId);
 }
 
 bool InspectorUi::showExperimentalWarning()