Fix problems with browse of folder in settings dialog.

This commit is contained in:
Adam Treat
2023-07-09 13:05:06 -04:00
parent 58d6f40f50
commit d9f0245c1b
4 changed files with 23 additions and 19 deletions

View File

@@ -53,14 +53,6 @@ MySettingsTab {
MySettings.userDefaultModel = comboBox.currentText
}
}
FolderDialog {
id: modelPathDialog
title: "Please choose a directory"
currentFolder: "file://" + MySettings.modelPath
onAccepted: {
MySettings.modelPath = selectedFolder
}
}
Label {
id: modelPathLabel
text: qsTr("Download path:")
@@ -93,7 +85,11 @@ MySettingsTab {
Layout.column: 2
text: qsTr("Browse")
Accessible.description: qsTr("Opens a folder picker dialog to choose where to save model files")
onClicked: modelPathDialog.open()
onClicked: {
openFolderDialog("file://" + MySettings.modelPath, function(selectedFolder) {
MySettings.modelPath = selectedFolder
})
}
}
Label {
id: nThreadsLabel