From 7fb9ec983573b023b3d2807cba5182f690ec7a20 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Sat, 5 Mar 2016 16:48:50 -0800 Subject: [PATCH] Add "Clear flight trails" --- .../FlightDisplayViewWidgets.qml | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/FlightDisplay/FlightDisplayViewWidgets.qml b/src/FlightDisplay/FlightDisplayViewWidgets.qml index f283a7c77..3f998e9d4 100644 --- a/src/FlightDisplay/FlightDisplayViewWidgets.qml +++ b/src/FlightDisplay/FlightDisplayViewWidgets.qml @@ -197,23 +197,37 @@ Item { z: QGroundControl.zOrderWidgets dropDownComponent: Component { - Row { + Column { spacing: ScreenTools.defaultFontPixelWidth - Repeater { - model: QGroundControl.flightMapSettings.mapTypes + Row { + spacing: ScreenTools.defaultFontPixelWidth + + Repeater { + model: QGroundControl.flightMapSettings.mapTypes - QGCButton { - checkable: true - checked: _flightMap ? _flightMap.mapType == text : false - text: modelData + QGCButton { + checkable: true + checked: _flightMap ? _flightMap.mapType == text : false + text: modelData - onClicked: { - _flightMap.mapType = text - _dropButtonsExclusiveGroup.current = null + onClicked: { + _flightMap.mapType = text + _dropButtonsExclusiveGroup.current = null + } } } } + + QGCButton { + text: "Clear flight trails" + enabled: QGroundControl.multiVehicleManager.activeVehicle + + onClicked: { + QGroundControl.multiVehicleManager.activeVehicle.clearTrajectoryPoints() + _dropButtonsExclusiveGroup.current = null + } + } } } } -- 2.22.0