Commit fac731f4 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5409 from DonLakeFlyer/GoTo

Go to location fixes
parents 22b24fe9 394c6b16
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
<file alias="QGroundControl/Controls/MissionItemStatus.qml">src/PlanView/MissionItemStatus.qml</file> <file alias="QGroundControl/Controls/MissionItemStatus.qml">src/PlanView/MissionItemStatus.qml</file>
<file alias="QGroundControl/Controls/ModeSwitchDisplay.qml">src/QmlControls/ModeSwitchDisplay.qml</file> <file alias="QGroundControl/Controls/ModeSwitchDisplay.qml">src/QmlControls/ModeSwitchDisplay.qml</file>
<file alias="QGroundControl/Controls/MultiRotorMotorDisplay.qml">src/QmlControls/MultiRotorMotorDisplay.qml</file> <file alias="QGroundControl/Controls/MultiRotorMotorDisplay.qml">src/QmlControls/MultiRotorMotorDisplay.qml</file>
<file alias="QGroundControl/Controls/NoMouseThroughRectangle.qml">src/QmlControls/NoMouseThroughRectangle.qml</file>
<file alias="QGroundControl/Controls/OfflineMapButton.qml">src/QmlControls/OfflineMapButton.qml</file> <file alias="QGroundControl/Controls/OfflineMapButton.qml">src/QmlControls/OfflineMapButton.qml</file>
<file alias="QGroundControl/Controls/ParameterEditor.qml">src/QmlControls/ParameterEditor.qml</file> <file alias="QGroundControl/Controls/ParameterEditor.qml">src/QmlControls/ParameterEditor.qml</file>
<file alias="QGroundControl/Controls/ParameterEditorDialog.qml">src/QmlControls/ParameterEditorDialog.qml</file> <file alias="QGroundControl/Controls/ParameterEditorDialog.qml">src/QmlControls/ParameterEditorDialog.qml</file>
......
...@@ -540,6 +540,7 @@ QGCView { ...@@ -540,6 +540,7 @@ QGCView {
id: guidedActionsController id: guidedActionsController
missionController: _missionController missionController: _missionController
confirmDialog: guidedActionConfirm confirmDialog: guidedActionConfirm
actionList: guidedActionList
altitudeSlider: _altitudeSlider altitudeSlider: _altitudeSlider
z: _flightVideoPipControl.z + 1 z: _flightVideoPipControl.z + 1
......
...@@ -240,8 +240,9 @@ FlightMap { ...@@ -240,8 +240,9 @@ FlightMap {
anchorPoint.y: sourceItem.anchorPointY anchorPoint.y: sourceItem.anchorPointY
sourceItem: MissionItemIndexLabel { sourceItem: MissionItemIndexLabel {
checked: true checked: true
label: qsTr("G", "Goto here waypoint") // second string is translator's hint. index: -1
label: qsTr("Goto here", "Goto here waypoint")
} }
} }
...@@ -260,7 +261,7 @@ FlightMap { ...@@ -260,7 +261,7 @@ FlightMap {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
if (guidedActionsController.showGotoLocation) { if (guidedActionsController.showGotoLocation && !guidedActionsController.guidedUIVisible) {
_gotoHereCoordinate = flightMap.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */) _gotoHereCoordinate = flightMap.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */)
guidedActionsController.confirmAction(guidedActionsController.actionGoto, _gotoHereCoordinate) guidedActionsController.confirmAction(guidedActionsController.actionGoto, _gotoHereCoordinate)
} }
......
...@@ -16,7 +16,7 @@ import QGroundControl.Controls 1.0 ...@@ -16,7 +16,7 @@ import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0 import QGroundControl.Palette 1.0
/// Guided actions confirmation dialog /// Guided actions confirmation dialog
Rectangle { NoMouseThroughRectangle {
id: _root id: _root
border.color: qgcPal.alertBorder border.color: qgcPal.alertBorder
border.width: 1 border.width: 1
......
...@@ -17,7 +17,7 @@ import QGroundControl.Controls 1.0 ...@@ -17,7 +17,7 @@ import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0 import QGroundControl.Palette 1.0
/// Dialog showing list of available guided actions /// Dialog showing list of available guided actions
Rectangle { NoMouseThroughRectangle {
id: _root id: _root
width: actionColumn.width + (_margins * 4) width: actionColumn.width + (_margins * 4)
height: actionColumn.height + (_margins * 4) height: actionColumn.height + (_margins * 4)
......
...@@ -29,6 +29,7 @@ Item { ...@@ -29,6 +29,7 @@ Item {
property var missionController property var missionController
property var confirmDialog property var confirmDialog
property var actionList
property var altitudeSlider property var altitudeSlider
readonly property string emergencyStopTitle: qsTr("Emergency Stop") readonly property string emergencyStopTitle: qsTr("Emergency Stop")
...@@ -96,6 +97,8 @@ Item { ...@@ -96,6 +97,8 @@ Item {
property bool showLandAbort: _activeVehicle && _vehicleFlying && _activeVehicle.fixedWing && _vehicleLanding property bool showLandAbort: _activeVehicle && _vehicleFlying && _activeVehicle.fixedWing && _vehicleLanding
property bool showGotoLocation: _activeVehicle && _activeVehicle.guidedMode && _vehicleFlying property bool showGotoLocation: _activeVehicle && _activeVehicle.guidedMode && _vehicleFlying
property bool guidedUIVisible: guidedActionConfirm.visible || guidedActionList.visible
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property string _flightMode: _activeVehicle ? _activeVehicle.flightMode : "" property string _flightMode: _activeVehicle ? _activeVehicle.flightMode : ""
property bool _missionAvailable: missionController.containsItems property bool _missionAvailable: missionController.containsItems
......
...@@ -13,7 +13,7 @@ Canvas { ...@@ -13,7 +13,7 @@ Canvas {
signal clicked signal clicked
property string label ///< Label to show to the side of the index indicator property string label ///< Label to show to the side of the index indicator
property int index: 0 ///< Index to show in the indicator, 0 will show label instead property int index: 0 ///< Index to show in the indicator, 0 will show single char label instead, -1 first char of label in indicator full label to the side
property bool checked: false property bool checked: false
property bool small: false property bool small: false
property var color: checked ? "green" : qgcPal.mapButtonHighlight property var color: checked ? "green" : qgcPal.mapButtonHighlight
...@@ -33,7 +33,7 @@ Canvas { ...@@ -33,7 +33,7 @@ Canvas {
property real _labelMargin: 2 property real _labelMargin: 2
property real _labelRadius: _indicatorRadius + _labelMargin property real _labelRadius: _indicatorRadius + _labelMargin
property string _label: index === 0 ? "" : label property string _label: index === 0 ? "" : label
property string _index: index === 0 ? label : index property string _index: index === 0 || index === -1 ? label.charAt(0) : index
onColorChanged: requestPaint() onColorChanged: requestPaint()
onShowGimbalYawChanged: requestPaint() onShowGimbalYawChanged: requestPaint()
......
import QtQuick 2.3
import QtQuick.Controls 1.2
/// This control is used to create a Rectangle control which does not allow mouse events to bleed through to the control
/// which is beneath it.
Rectangle {
MouseArea {
anchors.fill: parent
preventStealing: true
onWheel: { wheel.accepted = true; }
onPressed: { mouse.accepted = true; }
onReleased: { mouse.accepted = true; }
}
}
...@@ -25,6 +25,7 @@ MissionItemMapVisual 1.0 MissionItemMapVisual.qml ...@@ -25,6 +25,7 @@ MissionItemMapVisual 1.0 MissionItemMapVisual.qml
MissionItemStatus 1.0 MissionItemStatus.qml MissionItemStatus 1.0 MissionItemStatus.qml
ModeSwitchDisplay 1.0 ModeSwitchDisplay.qml ModeSwitchDisplay 1.0 ModeSwitchDisplay.qml
MultiRotorMotorDisplay 1.0 MultiRotorMotorDisplay.qml MultiRotorMotorDisplay 1.0 MultiRotorMotorDisplay.qml
NoMouseThroughRectangle 1.0 NoMouseThroughRectangle.qml
ParameterEditor 1.0 ParameterEditor.qml ParameterEditor 1.0 ParameterEditor.qml
ParameterEditorDialog 1.0 ParameterEditorDialog.qml ParameterEditorDialog 1.0 ParameterEditorDialog.qml
PlanToolBar 1.0 PlanToolBar.qml PlanToolBar 1.0 PlanToolBar.qml
......
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