Browse Source

FlyViewMap.qml: fix previous c1364dad3 commit after backport to 4.3 from master:

Leaving set ekf origin out as well, as that hasn't been backported to 4.3
QGC4.4
davidsastresas 11 months ago committed by Julian Oes
parent
commit
6e152ec140
No known key found for this signature in database
GPG Key ID: F0ED380FEA56DE41
  1. 40
      src/FlightDisplay/FlyViewMap.qml

40
src/FlightDisplay/FlyViewMap.qml

@ -536,6 +536,22 @@ FlightMap { @@ -536,6 +536,22 @@ FlightMap {
}
}
MouseArea {
anchors.fill: parent
onClicked: {
if (!globals.guidedControllerFlyView.guidedUIVisible &&
(globals.guidedControllerFlyView.showGotoLocation || globals.guidedControllerFlyView.showOrbit || globals.guidedControllerFlyView.showROI || globals.guidedControllerFlyView.showSetHome || globals.guidedControllerFlyView.showSetEstimatorOrigin)) {
orbitMapCircle.hide()
gotoLocationItem.hide()
var clickCoord = _root.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */)
var mapClickMenu = popupMenuComponent.createObject(_root, { coord: clickCoord, contentItemComponent: mapClickMenuComponent })
mapClickMenu.setPosition(mouse.x, mouse.y)
mapClickMenu.open()
}
}
}
Component {
id: popupMenuComponent
@ -635,18 +651,6 @@ FlightMap { @@ -635,18 +651,6 @@ FlightMap {
globals.guidedControllerFlyView.confirmAction(globals.guidedControllerFlyView.actionSetHome, mapClickCoord)
}
}
QGCButton {
Layout.fillWidth: true
text: qsTr("Set Estimator Origin")
visible: globals.guidedControllerFlyView.showSetEstimatorOrigin
onClicked: {
if (popup.opened) {
popup.close()
}
globals.guidedControllerFlyView.confirmAction(globals.guidedControllerFlyView.actionSetEstimatorOrigin, mapClickCoord)
}
}
}
}
@ -690,18 +694,6 @@ FlightMap { @@ -690,18 +694,6 @@ FlightMap {
}
}
onMapClicked: (position) => {
if (!globals.guidedControllerFlyView.guidedUIVisible &&
(globals.guidedControllerFlyView.showGotoLocation || globals.guidedControllerFlyView.showOrbit || globals.guidedControllerFlyView.showROI || globals.guidedControllerFlyView.showSetHome || globals.guidedControllerFlyView.showSetEstimatorOrigin)) {
orbitMapCircle.hide()
gotoLocationItem.hide()
var clickCoord = _root.toCoordinate(Qt.point(position.x, position.y), false /* clipToViewPort */)
var mapClickMenu = popupMenuComponent.createObject(_root, { coord: clickCoord, contentItemComponent: mapClickMenuComponent })
mapClickMenu.setPosition(position.x, position.y)
mapClickMenu.open()
}
}
MapScale {
id: mapScale
anchors.margins: _toolsMargin

Loading…
Cancel
Save