OS selector: Return to home after close

Prior to this change, you could enter a submenu of the OS selector,
close the window, and then change device filter - presenting stale information
when you went back in to the OS selector.

Work around this by resetting the OS selector sequence when you close
the OS selector window.
This commit is contained in:
Tom Dewey tom.dewey@raspberrypi.com 2023-10-05 11:06:22 +01:00
parent 3f665e01b4
commit d603d29671

View file

@ -541,6 +541,7 @@ ApplicationWindow {
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
ospopup.close() ospopup.close()
osswipeview.decrementCurrentIndex()
} }
} }
} }
@ -1266,6 +1267,7 @@ ApplicationWindow {
imageWriter.setSrc(file) imageWriter.setSrc(file)
osbutton.text = imageWriter.srcFileName() osbutton.text = imageWriter.srcFileName()
ospopup.close() ospopup.close()
osswipeview.decrementCurrentIndex()
if (imageWriter.readyToWrite()) { if (imageWriter.readyToWrite()) {
writebutton.enabled = true writebutton.enabled = true
} }
@ -1596,6 +1598,7 @@ ApplicationWindow {
imageWriter.setSrc(d.url, d.image_download_size, d.extract_size, typeof(d.extract_sha256) != "undefined" ? d.extract_sha256 : "", typeof(d.contains_multiple_files) != "undefined" ? d.contains_multiple_files : false, ospopup.categorySelected, d.name, typeof(d.init_format) != "undefined" ? d.init_format : "") imageWriter.setSrc(d.url, d.image_download_size, d.extract_size, typeof(d.extract_sha256) != "undefined" ? d.extract_sha256 : "", typeof(d.contains_multiple_files) != "undefined" ? d.contains_multiple_files : false, ospopup.categorySelected, d.name, typeof(d.init_format) != "undefined" ? d.init_format : "")
osbutton.text = d.name osbutton.text = d.name
ospopup.close() ospopup.close()
osswipeview.decrementCurrentIndex()
if (imageWriter.readyToWrite()) { if (imageWriter.readyToWrite()) {
writebutton.enabled = true writebutton.enabled = true
} }