Skip to content

Commit

Permalink
Add remembering of main select and file name
Browse files Browse the repository at this point in the history
  • Loading branch information
gastoner committed Oct 9, 2023
1 parent eb35f02 commit 6e24494
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/app/qml/DrivePage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Page {
Connections {
target: portalFileDialog
function onFileSelected(fileName) {
mainWindow.fileName = fileName
releases.selectLocalFile(fileName)
}
}
Expand Down
1 change: 0 additions & 1 deletion src/app/qml/MainPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Page {
text: qsTr("Select .iso file")
onClicked: {
selectedOption = Units.MainSelect.Write
releases.selectLocalFile("")
}
ButtonGroup.group: radioGroup
}
Expand Down
8 changes: 4 additions & 4 deletions src/app/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ApplicationWindow {
property int selectedOption: Units.MainSelect.Download
property QtObject lastRestoreable
property bool eraseVariant: false
property string fileName: ""

ColumnLayout {
id: mainLayout
Expand Down Expand Up @@ -130,7 +131,6 @@ ApplicationWindow {
StateChangeScript {
script: {
//reset of source on versionPage
selectedOption = Units.MainSelect.Download
releases.filterSource = 0
if (stackView.depth > 1) {
while (stackView.depth != 1) {
Expand Down Expand Up @@ -298,11 +298,11 @@ ApplicationWindow {
if (selectedPage == Units.Page.MainPage) {
if (selectedOption == Units.MainSelect.Write) {
if (releases.localFile.iso)
releases.selectLocalFile()
releases.selectLocalFile(fileName)
selectedPage = Units.Page.DrivePage
} else if (selectedOption == Units.MainSelect.Restore)
} else if (selectedOption == Units.MainSelect.Restore && drives.lastRestoreable)
selectedPage = Units.Page.RestorePage
else
else if (selectedOption == Units.MainSelect.Download)
selectedPage = Units.Page.VersionPage
} else if (selectedPage == Units.Page.VersionPage) {
selectedPage += 1
Expand Down

0 comments on commit 6e24494

Please sign in to comment.