diff --git a/ChangeLog.md b/ChangeLog.md index 0dd330d126dc59ceb369c67373c1da23156d430d..9d2f4f3fae773b509d3920193b33c17285cf60f4 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,6 +6,8 @@ Note: This file only contains high level features or important fixes. ### 4.0.6 - Not yet released +* Analyze/Log Download - Fix download on mobile versions of QGC + ### 4.0.5 - Stable * Solo: Fix mission upload failures diff --git a/src/AnalyzeView/LogDownloadController.cc b/src/AnalyzeView/LogDownloadController.cc index d44e92f983cc43dc6c87ef00357f434b0884334e..fee51217fe88c7fbd628c78da8d9dfcd7a29ed03 100644 --- a/src/AnalyzeView/LogDownloadController.cc +++ b/src/AnalyzeView/LogDownloadController.cc @@ -519,19 +519,9 @@ void LogDownloadController::download(QString path) { QString dir = path; -#if defined(__mobile__) - if(dir.isEmpty()) { + if (dir.isEmpty()) { dir = qgcApp()->toolbox()->settingsManager()->appSettings()->logSavePath(); } -#else - if(dir.isEmpty()) { - dir = QString(); //-- TODO: QGCQFileDialog::getExistingDirectory( - // MainWindow::instance(), - // tr("Log Download Directory"), - // QDir::homePath(), - // QGCQFileDialog::ShowDirsOnly | QGCQFileDialog::DontResolveSymlinks); - } -#endif downloadToDirectory(dir); } diff --git a/src/AnalyzeView/LogDownloadPage.qml b/src/AnalyzeView/LogDownloadPage.qml index 2117e34fbd381ecfeb95300b5688440b0b19ad1c..cd4e80aa46e28cfd82f17a521430d63a899e8800 100644 --- a/src/AnalyzeView/LogDownloadPage.qml +++ b/src/AnalyzeView/LogDownloadPage.qml @@ -147,11 +147,16 @@ AnalyzePage { var o = logController.model.get(rowIndex) if (o) o.selected = true }) - fileDialog.title = qsTr("Select save directory") - fileDialog.selectExisting = true - fileDialog.folder = QGroundControl.settingsManager.appSettings.logSavePath - fileDialog.selectFolder = true - fileDialog.openForLoad() + if (ScreenTools.isMobile) { + // You can't pick folders in mobile, only default location is used + logController.download() + } else { + fileDialog.title = qsTr("Select save directory") + fileDialog.selectExisting = true + fileDialog.folder = QGroundControl.settingsManager.appSettings.logSavePath + fileDialog.selectFolder = true + fileDialog.openForLoad() + } } QGCFileDialog { id: fileDialog