Shift+Ctrl+X option screen: allow persisting settings
This commit is contained in:
27
main.qml
27
main.qml
@@ -188,10 +188,15 @@ ApplicationWindow {
|
||||
Material.background: "#ffffff"
|
||||
Material.foreground: "#c51a4a"
|
||||
onClicked: {
|
||||
if (!imageWriter.readyToWrite())
|
||||
return;
|
||||
if (!imageWriter.readyToWrite()) {
|
||||
return
|
||||
}
|
||||
|
||||
confirmwritepopup.askForConfirmation()
|
||||
if (!optionspopup.initialized && imageWriter.hasSavedCustomizationSettings()) {
|
||||
usesavedsettingspopup.openPopup()
|
||||
} else {
|
||||
confirmwritepopup.askForConfirmation()
|
||||
}
|
||||
}
|
||||
Accessible.onPressAction: clicked()
|
||||
}
|
||||
@@ -790,6 +795,22 @@ ApplicationWindow {
|
||||
id: optionspopup
|
||||
}
|
||||
|
||||
UseSavedSettingsPopup {
|
||||
id: usesavedsettingspopup
|
||||
onYes: {
|
||||
optionspopup.initialize()
|
||||
optionspopup.applySettings()
|
||||
confirmwritepopup.askForConfirmation()
|
||||
}
|
||||
onNo: {
|
||||
imageWriter.clearSavedCustomizationSettings()
|
||||
confirmwritepopup.askForConfirmation()
|
||||
}
|
||||
onEditSettings: {
|
||||
optionspopup.openPopup()
|
||||
}
|
||||
}
|
||||
|
||||
/* Utility functions */
|
||||
function httpRequest(url, callback) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
|
||||
Reference in New Issue
Block a user