Unverified Commit 3b5460a8 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8603 from DonLakeFlyer/LogDownloadMobile

Fix mobile Log Download
parents 4fc65407 9af279f5
...@@ -6,6 +6,8 @@ Note: This file only contains high level features or important fixes. ...@@ -6,6 +6,8 @@ Note: This file only contains high level features or important fixes.
### 4.0.6 - Not yet released ### 4.0.6 - Not yet released
* Analyze/Log Download - Fix download on mobile versions of QGC
### 4.0.5 - Stable ### 4.0.5 - Stable
* Solo: Fix mission upload failures * Solo: Fix mission upload failures
......
...@@ -519,19 +519,9 @@ void ...@@ -519,19 +519,9 @@ void
LogDownloadController::download(QString path) LogDownloadController::download(QString path)
{ {
QString dir = path; QString dir = path;
#if defined(__mobile__) if (dir.isEmpty()) {
if(dir.isEmpty()) {
dir = qgcApp()->toolbox()->settingsManager()->appSettings()->logSavePath(); 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); downloadToDirectory(dir);
} }
......
...@@ -147,12 +147,17 @@ AnalyzePage { ...@@ -147,12 +147,17 @@ AnalyzePage {
var o = logController.model.get(rowIndex) var o = logController.model.get(rowIndex)
if (o) o.selected = true if (o) o.selected = true
}) })
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.title = qsTr("Select save directory")
fileDialog.selectExisting = true fileDialog.selectExisting = true
fileDialog.folder = QGroundControl.settingsManager.appSettings.logSavePath fileDialog.folder = QGroundControl.settingsManager.appSettings.logSavePath
fileDialog.selectFolder = true fileDialog.selectFolder = true
fileDialog.openForLoad() fileDialog.openForLoad()
} }
}
QGCFileDialog { QGCFileDialog {
id: fileDialog id: fileDialog
onAcceptedForLoad: { onAcceptedForLoad: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment