Browse Source

Perf: Move leftPanel to Loader

QGC4.4
Don Gagne 9 years ago
parent
commit
c3a427b9e4
  1. 8
      src/ui/MainWindowInner.qml

8
src/ui/MainWindowInner.qml

@ -205,7 +205,7 @@ Item {
} }
function showLeftMenu() { function showLeftMenu() {
if(!leftPanel.visible && !leftPanel.item.animateShowDialog.running) { if(!leftPanel.visible) {
leftPanel.visible = true leftPanel.visible = true
leftPanel.item.animateShowDialog.start() leftPanel.item.animateShowDialog.start()
} else if(leftPanel.visible && !leftPanel.item.animateShowDialog.running) { } else if(leftPanel.visible && !leftPanel.item.animateShowDialog.running) {
@ -261,6 +261,8 @@ Item {
anchors.fill: parent anchors.fill: parent
visible: false visible: false
z: QGroundControl.zOrderTopMost + 100 z: QGroundControl.zOrderTopMost + 100
active: visible
source: "MainWindowLeftPanel.qml"
} }
//-- Main UI //-- Main UI
@ -276,10 +278,6 @@ Item {
isBackgroundDark: flightView.isBackgroundDark isBackgroundDark: flightView.isBackgroundDark
z: QGroundControl.zOrderTopMost z: QGroundControl.zOrderTopMost
Component.onCompleted: {
leftPanel.source = "MainWindowLeftPanel.qml"
}
onShowSetupView: mainWindow.showSetupView() onShowSetupView: mainWindow.showSetupView()
onShowPlanView: mainWindow.showPlanView() onShowPlanView: mainWindow.showPlanView()
onShowFlyView: mainWindow.showFlyView() onShowFlyView: mainWindow.showFlyView()

Loading…
Cancel
Save