From c3a427b9e4186832369a3cb9f4ff08bce997985f Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 25 Feb 2016 18:31:32 -0800 Subject: [PATCH] Perf: Move leftPanel to Loader --- src/ui/MainWindowInner.qml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ui/MainWindowInner.qml b/src/ui/MainWindowInner.qml index 16c47d0db..e515a9288 100644 --- a/src/ui/MainWindowInner.qml +++ b/src/ui/MainWindowInner.qml @@ -205,7 +205,7 @@ Item { } function showLeftMenu() { - if(!leftPanel.visible && !leftPanel.item.animateShowDialog.running) { + if(!leftPanel.visible) { leftPanel.visible = true leftPanel.item.animateShowDialog.start() } else if(leftPanel.visible && !leftPanel.item.animateShowDialog.running) { @@ -261,6 +261,8 @@ Item { anchors.fill: parent visible: false z: QGroundControl.zOrderTopMost + 100 + active: visible + source: "MainWindowLeftPanel.qml" } //-- Main UI @@ -276,10 +278,6 @@ Item { isBackgroundDark: flightView.isBackgroundDark z: QGroundControl.zOrderTopMost - Component.onCompleted: { - leftPanel.source = "MainWindowLeftPanel.qml" - } - onShowSetupView: mainWindow.showSetupView() onShowPlanView: mainWindow.showPlanView() onShowFlyView: mainWindow.showFlyView() -- 2.22.0