diff --git a/src/FlightDisplay/FlightDisplayView.qml b/src/FlightDisplay/FlightDisplayView.qml index 695dfe3944648a8df2af3f0ce46813317080dfeb..9299d0085291c7beaa32064f3f2c8a97943cc38d 100644 --- a/src/FlightDisplay/FlightDisplayView.qml +++ b/src/FlightDisplay/FlightDisplayView.qml @@ -44,7 +44,6 @@ Item { QGCPalette { id: qgcPal; colorGroupEnabled: enabled } property real availableHeight: parent.height - property bool interactive: true readonly property bool isBackgroundDark: _mainIsMap ? (_flightMap ? _flightMap.isSatelliteMap : true) : true @@ -83,11 +82,6 @@ Item { FlightDisplayViewController { id: _controller } - onInteractiveChanged: { - if(_flightMap) - _flightMap.interactive = interactive - } - function reloadContents() { if(_flightVideo) { _flightVideo.visible = false diff --git a/src/FlightMap/FlightMap.qml b/src/FlightMap/FlightMap.qml index add34e25ba22939319f9ef6cc501ccb3394fc39c..5d5941baa6f9c8d47599df8fc7e7e3041c7db62c 100644 --- a/src/FlightMap/FlightMap.qml +++ b/src/FlightMap/FlightMap.qml @@ -43,7 +43,6 @@ import QGroundControl.Mavlink 1.0 Map { id: _map - property bool interactive: true property string mapName: 'defaultMap' property string mapType: QGroundControl.flightMapSettings.mapTypeForMapName(mapName) // property alias mapWidgets: controlWidgets @@ -54,7 +53,6 @@ Map { zoomLevel: 18 center: QGroundControl.defaultMapPosition gesture.flickDeceleration: 3000 - gesture.enabled: interactive gesture.activeGestures: MapGestureArea.ZoomGesture | MapGestureArea.PanGesture | MapGestureArea.FlickGesture plugin: Plugin { name: "QGroundControl" } diff --git a/src/ui/MainWindowInner.qml b/src/ui/MainWindowInner.qml index 72e922e661e9b17625d8deec3fbad9e57e815409..6a9f019ad86494e17deffcbf833be9026db9056b 100644 --- a/src/ui/MainWindowInner.qml +++ b/src/ui/MainWindowInner.qml @@ -201,7 +201,6 @@ Item { } else { criticalMessageText.text = message criticalMmessageArea.visible = true - mainWindow.setMapInteractive(false) } } @@ -221,10 +220,6 @@ Item { } } - function setMapInteractive(enabled) { - flightView.interactive = enabled - } - onFormatedMessageChanged: { if(messageArea.visible) { messageText.append(formatedMessage) @@ -248,7 +243,6 @@ Item { } currentPopUp = messageArea messageArea.visible = true - mainWindow.setMapInteractive(false) } function showPopUp(dropItem, centerX) { @@ -341,7 +335,6 @@ Item { function close() { currentPopUp = null messageText.text = "" - mainWindow.setMapInteractive(true) messageArea.visible = false } @@ -405,7 +398,6 @@ Item { mainWindow.messageQueue = [] } else { criticalMessageText.text = "" - mainWindow.setMapInteractive(true) criticalMmessageArea.visible = false } } @@ -418,6 +410,15 @@ Item { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: ScreenTools.defaultFontPixelHeight + + MouseArea { + // This MouseArea prevents the Map below it from getting Mouse events. Without this + // things like mousewheel will scroll the Flickable and then scroll the map as well. + anchors.fill: parent + preventStealing: true + onWheel: wheel.accepted = true + } + Flickable { id: criticalMessageFlick anchors.margins: ScreenTools.defaultFontPixelHeight @@ -438,6 +439,7 @@ Item { color: "#fdfd3b" } } + //-- Dismiss Critical Message Image { id: criticalClose @@ -457,6 +459,7 @@ Item { } } } + //-- More text below indicator Image { anchors.margins: ScreenTools.defaultFontPixelHeight