diff --git a/src/FlightDisplay/FlyViewVideo.qml b/src/FlightDisplay/FlyViewVideo.qml index 54a9956..65b4232 100644 --- a/src/FlightDisplay/FlyViewVideo.qml +++ b/src/FlightDisplay/FlyViewVideo.qml @@ -89,10 +89,11 @@ Item { } OnScreenGimbalController { - id: onScreenGimbalController - anchors.fill: parent - screenX: flyViewVideoMouseArea.mouseX - screenY: flyViewVideoMouseArea.mouseY + id: onScreenGimbalController + anchors.fill: parent + screenX: flyViewVideoMouseArea.mouseX + screenY: flyViewVideoMouseArea.mouseY + cameraTrackingEnabled: videoStreaming._camera && videoStreaming._camera.trackingEnabled } MouseArea { diff --git a/src/FlightDisplay/OnScreenGimbalController.qml b/src/FlightDisplay/OnScreenGimbalController.qml index 255dd30..c908880 100644 --- a/src/FlightDisplay/OnScreenGimbalController.qml +++ b/src/FlightDisplay/OnScreenGimbalController.qml @@ -29,7 +29,8 @@ Item { property var activeGimbal: gimbalController ? gimbalController.activeGimbal : undefined property bool gimbalAvailable: activeGimbal != undefined property var gimbalControllerSettings: QGroundControl.settingsManager.gimbalControllerSettings - property bool shouldProcessClicks: gimbalControllerSettings.EnableOnScreenControl.value && activeGimbal ? true : false + property bool cameraTrackingEnabled: false // Used to ignore clicks when camera tracking operation is active, otherwise it would collide with these gimbal controls + property bool shouldProcessClicks: gimbalControllerSettings.EnableOnScreenControl.value && activeGimbal && !cameraTrackingEnabled ? true : false function clickControl() { if (!shouldProcessClicks) {