diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-03-09 10:52:46 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-09 12:40:44 -0700 |
commit | 90f8c1138e3869803bf363be6da117db0248e179 (patch) | |
tree | 61a01a2064c7c16206641b3400dbc5f2b2097b58 /mobile-widgets/qml/DownloadFromDiveComputer.qml | |
parent | 8138279a0459821e0640307757932192a2938847 (diff) | |
download | subsurface-90f8c1138e3869803bf363be6da117db0248e179.tar.gz |
mobile/DC-download: be more careful exiting download page
Don't just pop the top page off the stack, but pop the download page.
Also explicitly switch to the dive list afterwards.
Additionally, fix a typo in the code that attempts to deal with the
shortcut buttons. I believe that right now this code is completely
broken, but while I contemplate how this should work, let's at least fix
the stupid typo.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/DownloadFromDiveComputer.qml')
-rw-r--r-- | mobile-widgets/qml/DownloadFromDiveComputer.qml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml index 6e3700fe7..318d2b54d 100644 --- a/mobile-widgets/qml/DownloadFromDiveComputer.qml +++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml @@ -194,7 +194,7 @@ Kirigami.Page { if ( curVendor === comboVendor.currentText && curDevice.toUpperCase() === currentText) rememberedDCsGrid.setDC(curVendor, curProduct, curDevice) }else if (comboProduct.currentIndex !== -1 && currentText === "FTDI") { - if ( curVendor === comboVendor.currentText && cyrProduct === comboProduct.currentText && curDevice.toUpperCase() === currentText) { + if ( curVendor === comboVendor.currentText && curProduct === comboProduct.currentText && curDevice.toUpperCase() === currentText) { disableDC(i) break } @@ -339,12 +339,16 @@ Kirigami.Page { onClicked: { manager.cancelDownloadDC() if (!progressBar.visible) { - pageStack.pop(); + // remove the download page and show dive list + pageStack.pop(downloadFromDc) + rootItem.showDiveList() download.text = qsTr("Download") divesDownloaded = false manager.progressMessage = "" + manager.appendTextToLog("exit DCDownload screen") + } else { + manager.appendTextToLog("cancel download") } - manager.appendTextToLog("exit DCDownload screen") } } TemplateButton { |