GlosSIConfig: ShortcutProps: Fix config not resetting on cancel

pull/183/head
Peter Repukat 2 years ago
parent 1bd3f075c1
commit e175b7046a

@ -67,13 +67,17 @@ Item {
}
onShortcutInfoChanged: function() {
nameInput.text = shortcutInfo.name || ""
if (extendedLogging) {
extendedLogging.checked = shortcutInfo.extendedLogging || false
if (!shortcutInfo) {
return;
}
if (nameInput) { // basic info (not in collapsible container)
nameInput.text = shortcutInfo.name || ""
launchApp.checked = shortcutInfo.launch.launch
pathInput.text = shortcutInfo.launch.launchPath || ""
argsInput.text = shortcutInfo.launch.launchAppArgs || ""
}
if (extendedLogging) { // advanced settings (collapsible container)
extendedLogging.checked = shortcutInfo.extendedLogging || false
closeOnExit.checked = shortcutInfo.launch.closeOnExit
waitForChildren.checked = shortcutInfo.launch.waitForChildProcs
hideDevices.checked = shortcutInfo.devices.hideDevices
@ -86,6 +90,7 @@ Item {
allowDesktopConfig.checked = shortcutInfo.controller.allowDesktopConfig
emulateDS4.checked = shortcutInfo.controller.emulateDS4
}
}
Flickable {
id: flickable
@ -157,7 +162,7 @@ Item {
CheckBox {
id: launchApp
text: qsTr("Launch app")
checked: shortcutInfo.launch.launch
checked: shortcutInfo ? shortcutInfo.launch.launch : false
onCheckedChanged: function() {
shortcutInfo.launch.launch = checked
if (checked) {
@ -748,6 +753,7 @@ Item {
Button {
text: qsTr("Cancel")
onClicked: function() {
resetInfo();
cancel()
}
}

Loading…
Cancel
Save