diff --git a/ChangeLog.md b/ChangeLog.md index 3a49d9eda786bdb4cf7cf09bf966e04c665791f1..ce8dfaf22c54271f0b90bf988092e0e99de9cb1f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -11,6 +11,7 @@ Note: This file only contains high level features or important fixes. ### 4.0.6 - Not yet released * Plan: Much better conversion of missions to KML for 3d visualization/verification of missions +* Analyze/Log Download - Fix download on mobile versions of QGC ### 4.0.5 - Stable 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 diff --git a/src/FlightMap/MapItems/MissionItemIndicator.qml b/src/FlightMap/MapItems/MissionItemIndicator.qml index 91ebe0b939a39d84a6e377ecfc022586ffaacc6e..7fd42ef42edde90dd493f41ce189da2ef1a5ceef 100644 --- a/src/FlightMap/MapItems/MissionItemIndicator.qml +++ b/src/FlightMap/MapItems/MissionItemIndicator.qml @@ -31,7 +31,8 @@ MapQuickItem { MissionItemIndexLabel { id: _label checked: _isCurrentItem - label: missionItem ? missionItem.abbreviation : "" + label: missionItem.abbreviation + index: missionItem.abbreviation.charAt(0) > 'A' && missionItem.abbreviation.charAt(0) < 'z' ? -1 : missionItem.sequenceNumber gimbalYaw: missionItem.missionGimbalYaw vehicleYaw: missionItem.missionVehicleYaw showGimbalYaw: !isNaN(missionItem.missionGimbalYaw) diff --git a/src/PlanView/MissionItemStatus.qml b/src/PlanView/MissionItemStatus.qml index 0a76dc123e30e558bdad3674c7326ae23e0aabac..db0e9eec29a64e049c5a204a3acd8ee2a3fedbda 100644 --- a/src/PlanView/MissionItemStatus.qml +++ b/src/PlanView/MissionItemStatus.qml @@ -99,12 +99,32 @@ Rectangle { checked: object.isCurrentItem label: object.abbreviation.charAt(0) index: object.abbreviation.charAt(0) > 'A' && object.abbreviation.charAt(0) < 'z' ? -1 : object.sequenceNumber - showSequenceNumbers: true - visible: true - onClicked: root.setCurrentSeqNum(object.sequenceNumber) + showSequenceNumbers: false + } + + Rectangle { + id: indexBackground + anchors.leftMargin: -2 + anchors.rightMargin: -2 + anchors.fill: indexLabel + color: qgcPal.window + opacity: 0.3 + visible: indexLabel.visible + transform: Rotation { angle: 90; origin.x: indexBackground.width / 2; origin.y: indexBackground.height / 2 } + } + + QGCLabel { + id: indexLabel + anchors.centerIn: parent + text: object.sequenceNumber + visible: indicator.index != -1 + transform: Rotation { angle: 90; origin.x: indexLabel.width / 2; origin.y: indexLabel.height / 2 } + } + + MouseArea { + anchors.fill: parent + onClicked: root.setCurrentSeqNum(object.sequenceNumber) } } } } - - diff --git a/src/QmlControls/MissionItemIndexLabel.qml b/src/QmlControls/MissionItemIndexLabel.qml index d84dea538f8aad2cacd4291ff50e6a06f67e86f5..8bd95dd24d2ab57e4928da81638bdbab2c645fd0 100644 --- a/src/QmlControls/MissionItemIndexLabel.qml +++ b/src/QmlControls/MissionItemIndexLabel.qml @@ -25,7 +25,7 @@ Canvas { property real gimbalYaw property real vehicleYaw property bool showGimbalYaw: false - property bool showSequenceNumbers: false + property bool showSequenceNumbers: true property real _width: showGimbalYaw ? Math.max(_gimbalYawWidth, labelControl.visible ? labelControl.width : indicator.width) : (labelControl.visible ? labelControl.width : indicator.width) property real _height: showGimbalYaw ? _gimbalYawWidth : (labelControl.visible ? labelControl.height : indicator.height) diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index 75708ec4b0ba5557d399f1cafee983b2de56a48a..2c1e26bc589fdbc56e1001f328e3a1270ed738a8 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -3287,7 +3287,7 @@ void Vehicle::setCurrentMissionSequence(int seq) &msg, static_cast(id()), _compID, - static_cast(seq)); + static_cast(seq)); sendMessageOnLink(priorityLink(), msg); }