From 9a9f20498f737c6806ca8f10c37e861b462c2003 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 25 Sep 2018 08:49:35 -0700 Subject: [PATCH] Prevent clicks going through top level items --- .../Widgets/QGCInstrumentWidgetAlternate.qml | 11 ++++++++++- src/ui/toolbar/MainToolBar.qml | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml b/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml index 93ebc493b..71696461f 100644 --- a/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml +++ b/src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml @@ -17,7 +17,6 @@ import QGroundControl.FactSystem 1.0 import QGroundControl.FlightMap 1.0 import QGroundControl.Palette 1.0 -/// Instrument panel shown when virtual thumbsticks are visible Rectangle { id: root width: getPreferredInstrumentWidth() @@ -40,6 +39,11 @@ Rectangle { property real _availableValueHeight: maxHeight - (root.height + _valuesItem.anchors.topMargin) property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle + // Prevent all clicks from going through to lower layers + DeadMouseArea { + anchors.fill: parent + } + QGCPalette { id: qgcPal } QGCAttitudeWidget { @@ -68,6 +72,11 @@ Rectangle { height: _valuesWidget.height visible: widgetRoot.showValues + // Prevent all clicks from going through to lower layers + DeadMouseArea { + anchors.fill: parent + } + Rectangle { anchors.fill: _valuesWidget color: qgcPal.window diff --git a/src/ui/toolbar/MainToolBar.qml b/src/ui/toolbar/MainToolBar.qml index 7d737e0f6..442456999 100644 --- a/src/ui/toolbar/MainToolBar.qml +++ b/src/ui/toolbar/MainToolBar.qml @@ -62,6 +62,11 @@ Rectangle { flyButton.checked = true } + // Prevent all clicks from going through to lower layers + DeadMouseArea { + anchors.fill: parent + } + /// Bottom single pixel divider Rectangle { anchors.left: parent.left -- 2.22.0