From deb27d4e865ffd7dc15a482db747e53f3247f6e8 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 17 Apr 2018 23:19:14 +0200 Subject: Select the root index when initially loading --- framework/qml/TreeView.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'framework/qml/TreeView.qml') diff --git a/framework/qml/TreeView.qml b/framework/qml/TreeView.qml index ec249eb9..c4a1a2ab 100644 --- a/framework/qml/TreeView.qml +++ b/framework/qml/TreeView.qml @@ -130,6 +130,16 @@ FocusScope { onActivated: root.activated(index) + //Select the initial index when the folder list is loaded + Connections { + target: treeView.__listView + onCountChanged: { + root.selectRootIndex() + //Only do this initially + enabled = false + } + } + alternatingRowColors: false headerVisible: false -- cgit v1.2.3