Commit 394c6b16 authored by DonLakeFlyer's avatar DonLakeFlyer

GoTo Location fixes

- Don't allow goto click while other guided ui is visible
- Use NoMouseThroughRectangle for guided ui popups
- Better visuals for goto indicator in map
parent a98b5b2e
......@@ -540,6 +540,7 @@ QGCView {
id: guidedActionsController
missionController: _missionController
confirmDialog: guidedActionConfirm
actionList: guidedActionList
altitudeSlider: _altitudeSlider
z: _flightVideoPipControl.z + 1
......
......@@ -240,8 +240,9 @@ FlightMap {
anchorPoint.y: sourceItem.anchorPointY
sourceItem: MissionItemIndexLabel {
checked: true
label: qsTr("G", "Goto here waypoint") // second string is translator's hint.
checked: true
index: -1
label: qsTr("Goto here", "Goto here waypoint")
}
}
......@@ -260,7 +261,7 @@ FlightMap {
anchors.fill: parent
onClicked: {
if (guidedActionsController.showGotoLocation) {
if (guidedActionsController.showGotoLocation && !guidedActionsController.guidedUIVisible) {
_gotoHereCoordinate = flightMap.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */)
guidedActionsController.confirmAction(guidedActionsController.actionGoto, _gotoHereCoordinate)
}
......
......@@ -16,7 +16,7 @@ import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
/// Guided actions confirmation dialog
Rectangle {
NoMouseThroughRectangle {
id: _root
border.color: qgcPal.alertBorder
border.width: 1
......
......@@ -17,7 +17,7 @@ import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
/// Dialog showing list of available guided actions
Rectangle {
NoMouseThroughRectangle {
id: _root
width: actionColumn.width + (_margins * 4)
height: actionColumn.height + (_margins * 4)
......
......@@ -29,6 +29,7 @@ Item {
property var missionController
property var confirmDialog
property var actionList
property var altitudeSlider
readonly property string emergencyStopTitle: qsTr("Emergency Stop")
......@@ -96,6 +97,8 @@ Item {
property bool showLandAbort: _activeVehicle && _vehicleFlying && _activeVehicle.fixedWing && _vehicleLanding
property bool showGotoLocation: _activeVehicle && _activeVehicle.guidedMode && _vehicleFlying
property bool guidedUIVisible: guidedActionConfirm.visible || guidedActionList.visible
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property string _flightMode: _activeVehicle ? _activeVehicle.flightMode : ""
property bool _missionAvailable: missionController.containsItems
......
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