From f8547877e1fe554ec2410bd901c1122757aa3700 Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Thu, 23 Feb 2017 13:14:48 -0500 Subject: [PATCH] Added a root loader to help deep nested children to show an element in the middle of the root Window. --- src/FlightDisplay/FlightDisplayView.qml | 2 +- src/ui/MainWindowInner.qml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/FlightDisplay/FlightDisplayView.qml b/src/FlightDisplay/FlightDisplayView.qml index 473136265..368279771 100644 --- a/src/FlightDisplay/FlightDisplayView.qml +++ b/src/FlightDisplay/FlightDisplayView.qml @@ -264,7 +264,7 @@ QGCView { anchors.top: parent.top anchors.bottom: parent.bottom width: height - radius: QGroundControl.videoManager.videoReceiver && QGroundControl.videoManager.videoReceiver.recording ? 0 : height + radius: QGroundControl.videoManager && QGroundControl.videoManager.videoReceiver && QGroundControl.videoManager.videoReceiver.recording ? 0 : height color: "red" } diff --git a/src/ui/MainWindowInner.qml b/src/ui/MainWindowInner.qml index dc374d571..0276d4055 100644 --- a/src/ui/MainWindowInner.qml +++ b/src/ui/MainWindowInner.qml @@ -530,5 +530,14 @@ Item { } } } + + //------------------------------------------------------------------------- + //-- Loader helper for any child, no matter how deep can display an element + // in the middle of the main window. + Loader { + id: rootLoader + anchors.centerIn: parent + } + } -- 2.22.0