Fix TreeView root index.
Parent folders will now be hidden based on the root folder selection in the GUI.
This commit is contained in:
@@ -27,6 +27,7 @@ Rectangle {
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
boundsMovement: Flickable.StopAtBounds
|
||||
clip: true
|
||||
rootIndex: FileSystem.rootIndex
|
||||
|
||||
Component.onCompleted: {
|
||||
FileSystem.setDirectory(root.rootDirectory)
|
||||
@@ -122,13 +123,13 @@ Rectangle {
|
||||
text: qsTr("Set as root index")
|
||||
onTriggered: {
|
||||
console.log("Setting directory: " + treeDelegate.filePath)
|
||||
FileSystem.setDirectory(treeDelegate.filePath)
|
||||
FileSystem.rootIndex = FileSystem.setDirectory(treeDelegate.filePath)
|
||||
}
|
||||
}
|
||||
Action {
|
||||
text: qsTr("Reset root index")
|
||||
onTriggered: {
|
||||
FileSystem.setDirectory("")
|
||||
FileSystem.rootIndex = FileSystem.setDirectory(root.rootDirectory)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user