Skip to content

Commit

Permalink
Fix writting of settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlich committed Aug 2, 2024
1 parent 0428932 commit 182816a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/qml/MainWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ ApplicationWindow {
}
document_changed = false;

console.log("writting " + opened_track_filename)
file_reader.write(Qt.resolvedUrl(opened_track_filename), JSON.stringify(tracks));
storeTrackSettings_with_dir_check(opened_track_filename);

Expand Down Expand Up @@ -739,6 +740,7 @@ ApplicationWindow {

recentlyOpenedFiles.tryAppend(String(opened_track_filename))

console.log("writting " + opened_track_filename)
file_reader.write(Qt.resolvedUrl(opened_track_filename), JSON.stringify(tracks));
storeTrackSettings_with_dir_check(Qt.resolvedUrl(tucekSettingsCSV));

Expand All @@ -763,6 +765,7 @@ ApplicationWindow {
saveFileDialog.open()
return;
}
console.log("writting " + opened_track_filename)
file_reader.write(Qt.resolvedUrl(opened_track_filename), JSON.stringify(tracks));
storeTrackSettings_with_dir_check(Qt.resolvedUrl(tucekSettingsCSV));

Expand Down Expand Up @@ -1217,7 +1220,7 @@ ApplicationWindow {

str += "</Folder></Document></kml>";


console.log("writing " + filename)
file_reader.write(Qt.resolvedUrl(filename), str);


Expand Down Expand Up @@ -1285,6 +1288,7 @@ ApplicationWindow {

str += "</gpx>"

console.log("writing " + filename)
file_reader.write(Qt.resolvedUrl(filename), str);

}
Expand Down Expand Up @@ -1319,6 +1323,7 @@ ApplicationWindow {

str += "</rte></gpx>"

console.log("writing " + filename)
file_reader.write(Qt.resolvedUrl(filename), str);

}
Expand Down Expand Up @@ -1367,6 +1372,7 @@ ApplicationWindow {
}
}

console.log("writing " + filename)
file_reader.write(Qt.resolvedUrl(filename), str);

}
Expand Down Expand Up @@ -1437,7 +1443,7 @@ ApplicationWindow {

function storeTrackSettings_with_dir_check(opened_track_filename) {
var tucekDir = file_reader.dirname_local(opened_track_filename) + "/" + tucekSettingsDIR;
var tucekFile = tucekDir + "/" + tucekSettingsCSV;
var tucekFile = "file://" + tucekDir + "/" + tucekSettingsCSV;
if (file_reader.is_dir_and_exists_local(tucekDir)) {
console.log("writing "+ tucekFile);
storeTrackSettings(Qt.resolvedUrl(tucekFile));
Expand Down Expand Up @@ -1592,6 +1598,7 @@ ApplicationWindow {
}
str += ""

console.log("writing " + filename)
file_reader.write(Qt.resolvedUrl(filename), str);

}
Expand Down

0 comments on commit 182816a

Please sign in to comment.