Commit d083ab6c authored by Leander Schulten's avatar Leander Schulten
Browse files

Merge branch 'feature/rtAudio'

parents 0fa87e84 9ac171fb
Pipeline #191212 passed with stage
in 4 minutes and 46 seconds
...@@ -115,15 +115,19 @@ Pane{ ...@@ -115,15 +115,19 @@ Pane{
} }
FileDialog{ FileDialog{
property var callback; property var callback;
function openAt(path, isFolder){
selectFolder = isFolder;
folder = pathToUrl(path);
open();
}
id: fileDialog id: fileDialog
title: "Please choose a file" title: "Please choose a file"
onAccepted: { onAccepted: {
console.log("fftey:"+callback); if(callback){
if(callback)callback(fileDialog.fileUrl.toString().substring(8)); callback(urlToPath(fileDialog.fileUrl));
} }else{
onSelectionAccepted: console.log("3") console.error("Error in File Dialog in SettingsView: No callback provided!")
onVisibleChanged: console.info("this") }
onRejected: console.log("rej") }
Component.onCompleted: console.log("comp")
} }
} }
...@@ -36,13 +36,8 @@ RowLayout{ ...@@ -36,13 +36,8 @@ RowLayout{
if(root.fileChooser === null){ if(root.fileChooser === null){
throw "fileChooser ist not set!"; throw "fileChooser ist not set!";
} }
path = root.path const fileDialog = root.fileChooser;
var fileDialog = root.fileChooser; fileDialog.openAt(parent.path, parent.folder);
fileDialog.selectFolder = parent.folder;
fileDialog.selectMultiple = !parent.folder;
fileDialog.folder = "file:///"+path.substring(0,path.lastIndexOf("/"));
fileDialog.addSelection("file:///"+path);
fileDialog.open();
fileDialog.callback = function(file){ fileDialog.callback = function(file){
root.path = file; root.path = file;
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment