From 37314eb9ff900780b8bb952c8fa87f278a634f3a Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 28 Oct 2009 15:39:04 +1000 Subject: Auto-select first tree item after reload. --- tools/qmldebugger/standalone/objecttree.cpp | 1 + tools/qmldebugger/standalone/objecttree.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/qmldebugger/standalone/objecttree.cpp b/tools/qmldebugger/standalone/objecttree.cpp index 4059e77..6c132b6 100644 --- a/tools/qmldebugger/standalone/objecttree.cpp +++ b/tools/qmldebugger/standalone/objecttree.cpp @@ -61,6 +61,7 @@ void ObjectTree::objectFetched() { dump(m_query->object(), 0); buildTree(m_query->object(), 0); + setCurrentItem(topLevelItem(0)); delete m_query; m_query = 0; diff --git a/tools/qmldebugger/standalone/objecttree.h b/tools/qmldebugger/standalone/objecttree.h index 95820f3..ba2e78f 100644 --- a/tools/qmldebugger/standalone/objecttree.h +++ b/tools/qmldebugger/standalone/objecttree.h @@ -27,8 +27,8 @@ signals: void expressionWatchRequested(const QmlDebugObjectReference &, const QString &); public slots: - void reload(int objectDebugId); - void setCurrentObject(int debugId); + void reload(int objectDebugId); // set the root object + void setCurrentObject(int debugId); // select an object in the tree protected: virtual void mousePressEvent(QMouseEvent *); -- cgit v0.12